Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!dimacs.rutgers.edu!aramis.rutgers.edu!paul.rutgers.edu!njin!uupsi!sunic!dkuug!diku!bombadil From: bombadil@diku.dk (Kristian Nielsen) Newsgroups: comp.sys.amiga.programmer Subject: Re: assembler language Message-ID: <1991Jun20.095722.25226@odin.diku.dk> Date: 20 Jun 91 09:57:22 GMT References: <1991Jun18.848.4216@canrem.uucp> Sender: bombadil@freja.diku.dk Distribution: comp Organization: Department of Computer Science, U of Copenhagen Lines: 56 david.wyand@canrem.uucp (david wyand) writes: >The assembler that I'm using is A68K V2.71, and seems to be having a few >problems with the source. The original assembler used was apparently >GENAM2 (never heard of it, myself). Well, here's the problems... >rs.l 16*2 >^could this mean reserve 32 long words? A68K chokes... Is there an >easy fix, other than using dc.l 32 times? >RsReset >^could this be the same as the EVEN opcode? If so, an easy fix. >and finally: __Rs which is just after an equ statement, such as >Envelope: equ __Rs The RSRESET and RS.?, and the __RS symbol are special features of the Hisoft Devpac assembler ('genam2'), They were included to be used for easy and fast definition of structures, and all the commodore include files can be converted to use these instead of the LONG/ULONG/UWORD/STRUCT macros. What you do is, basically: * * This structure occurs once for every polygon. * * struct polygon RSRESET ; reset the special counter __RS to 0. nrpoint RS.W 1 ;The label 'nrpoint' is set equal to 0. point1 RS.L 3 ;point1 = 2 point2 RS.L 3 ;point2 = 14 polygon_sizeof EQU __RS ;size of structure. * the same as 'polygon_sizeof RS.W 0' So, 'RSRESET' sets __RS to 0. 'label RS.? n' sets label=__RS, and increments __RS by n bytes/words/longs, in effect reserving 'room' for the structure entry. At any time, __RS holds the offset for the next field to be defined. Im not sure about the commodore macros, but the above should be equivalent to something like STRUCTURE polygon ;(or STRUCT - don't remember). UWORD nrpoint STRUCT point1,12 STRUCT point2,12 Remember to include types.i. And note: This is strictly from memory, you will have to look up the exact syntax yourself. Hope this helps, - Kristian.