Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!sdd.hp.com!think.com!linus!progress!tma From: tma@progress.COM (Tim Atchison) Newsgroups: comp.sys.nsc.32k Subject: test and set instructionn for NS32332 Summary: test and set instructionn for NS32332 Keywords: test and set instructionn for NS32332 Message-ID: <1991Feb13.210208.23589@progress.com> Date: 13 Feb 91 21:02:08 GMT Sender: news@progress.com (The News User) Organization: Progress Software Corp., Bedford, MA Lines: 57 Nntp-Posting-Host: ericf 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