"david wyand" <david.wyand@canrem.uucp> (06/18/91)
Hello fellow Amiga users... Recently, I've been trying to hack at the AMOS Music Library to create some of my own commands, but have run into a few problems. The library is written in assembler, so this is an assembly language question, not an AMOS one. 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 This one really has me stumpped. Neither of the header files which come with AMOS for the libraries defines this little goody. Is it assembler specific? Any ideas?? Any comfirmation or other help would be great. Thanx in advance. Oh, please respond with E-Mail if possible. I'll post the final findings later for anyone else who wishes to program AMOS. -Dave ***** UUCP: canrem!david.wyand Internet: david.wyand%canrem.uucp@lsuc.on.ca Others: david.wyand@canrem.uucp -------------------- -- Canada Remote Systems. Toronto, Ontario NorthAmeriNet Host
sschaem@starnet.uucp (Stephan Schaem) (06/19/91)
Genim2 is the macro assembler from decpac... check your a68k doc to reserve space... RSRESET and RS can be replaced by macros. Assign a name for the value to be use to 'emulate RS' like: STROFF SET 0 Use STROFF SET 0 for rsreset. And STROFF SET STROFF+.SIZE (.SIZE is 2 for RS.W, 4 for RS.l etc...) I done the above for the Adapt macro assembler and work fine. Of course STROFF can be __RS... But I suggest you get Devpac for The assembler mostly. Stephan.
bombadil@diku.dk (Kristian Nielsen) (06/20/91)
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.