[comp.sys.nsc.32k] test and set instructionn for NS32332

tma@progress.COM (Tim Atchison) (02/14/91)

I am looking for an autonomous (sp??) test-and-set instruction for the
NS32332 chip. I am working on a SIEMENS MX 300-20 running SINIX 5.23.
Unfortunately, I didn't get any assembler manuals with the machine.
If anyone has any ideas, here is the c code (testandset.c):

int
testandset (ptr)
unsigned char	*ptr;
{
    if ((*ptr) == 0)
        return 0;
    else
	return 1;
}

This is the disassembled c code (testandset.s):

;	National Semiconductor Corporation - GNX/CTP Version 3, Revision 4
;	-- testandset.s --   Wed Feb 13 12:32:43 1991
;	

	.program
	.module	testandset.c
	.globl	_testandset
	.align 4
_testandset:
	enter	[],0
	cmpqb	0,0(8(fp))
;***************************************************************
;******* (tas - like 680X0, xchg - like i386, i486 ?????) ******
;***************************************************************
	bne	LL1
	movqd	0,r0
	exit	[]
	ret	0
	.align 4
LL1:
	movqd	1,r0
	exit	[]
	ret	0
	.endseg

If you have any ideas, sample code, etc. , please e-mail me directly.
THAadvanceNKS !


--------------------------------------------------------------------------------
Timothy M. Atchison			UUCP: mit-eddie!progress!tma
Progress Software Corp.		    	Internet: tma@progress.com
5 Oak Park				FAX: 617-275-4595
Bedford, MA  01730
--
Timothy M. Atchison			UUCP: mit-eddie!progress!tma
Progress Software Corp.		    	Internet: tma@progress.com
5 Oak Park
Bedford, MA  01730