.TITLE MACPLOT Routines for matrix-based plotter .SBTTL Summary & Description ;++ ; MACPLOT.MAR: ; ; VAX-11 MACRO routines for VPLOT: ; by ; M. Gooley ; Millikin University Computer Center ; Decatur, Illinois 62522 ; ; Copyright (C) 1981 by M. Gooley. This software is ; distributed without cost, and may be reproduced only ; with the inclusion of this copyright statement. The ; author assumes no responsibility for the performance ; of this software. ; ; These routines do the dirty work for the VPLOT matrix- ; based plotter: they provide the illusion of a huge matrix of ; individually-addressable bits, each corresponding to one dot of ; a PRINTRONIX plot, whilst actually fetching 120-byte blocks of ; virtual memory only as needed (using the LIB$GET_VM library ; procedure). Much virtual memory is thereby saved, though at the ; expense of CPU time; each block also requires a longword pointer ; to its base-address, which "wastes" four bytes per block. ; ; 31 MAY 1985 A. KREYMER ; Added qualifiers PIC,OVR,REL,GBL,SHR,RD,WRT,LONG to SMALLDAT Psect ; for compatibility with Fortran SMALLDAT common ;-- .SBTTL Data area .PSECT SMALLDAT,PIC,OVR,REL,GBL,SHR,NOEXE,RD,WRT,LONG WIDTH: .LONG ;width of plot in blocks WTH4: .LONG ; ...times 4 WTH4M1: .LONG ; ...and minus 1: last character in line LENGTH: .LONG ; length of plot in blocks AREA: .LONG ; 4 times # of blocks--# of bytes in ; table of base-addresses TABEND: .LONG ; end of table of base-addresses BLKTAB: .LONG ; base of table of block base-addresses EORBLK: .LONG ; last block of current row (in DUMP) BITROW: .LONG 0 ; counter for row within block (in DUMP) BLKSIZE:.LONG 120 ; size of blocks, in bytes LASTADR:.long ; address of last-row indicator STRBASE:.long ; address of base-string STRLEN: .long ; address of string-length .SBTTL The Macros .PSECT MACPORTION,NOWRT .MACRO OUTEST REG,BOUND TSTL REG ;test register BLSS OUT ; branch to OUT if less than zero CMPL REG,BOUND ; compare register with BOUND BGEQ OUT ; branch to OUT if equal or greater .ENDM OUTEST .MACRO FREEBLK BASE,SIZE PUSHL BASE ; push register containing address of ; memory-block PUSHAL SIZE ; push addr. of longw. containing size CALLS #2,g^lib$FREE_VM ; return the memory block ; take no action if it's not wanted back .ENDM FREEBLK .SBTTL Initialisation Routine .ENTRY INITIAL,^M ; entry mask (R0-R5 are zapped by the ; MOVC5 instruction at the end of the ; routine... MOVL 4(AP),R2 ; width to R2 MOVL 8(AP),R3 ; length to R3 (arguments passed ; by-value) MOVL 12(AP),LASTADR ; address of last-row indicator ; (by-reference) MOVL 16(AP),STRLEN ; address of string return-length MOVL 20(AP),STRBASE ; address of string base ; (by reference) MULL3 R2,R3,R4 ; # of blocks to R4 MULL3 #4,R4,AREA ; 4 times that many bytes needed LOOP1: PUSHAL BLKTAB ; location to receive addr. of block PUSHAL AREA ; # of bytes requested CALLS #2,G^LIB$GET_VM ; allocate memory BLBC R0,LOOP1 ; try again if memory unavailable MOVL R2,WIDTH ; store width MULL2 #4,R2 ; calculate 4 times width MOVL R2,WTH4 ; store it SUBL3 #1,R2,WTH4M1 ; decrement it and store that MOVL R3,LENGTH ; store length ADDL3 BLKTAB,AREA,TABEND SUBL2 #4,TABEND ; decrement to get actual location ; TABEND=end of block-address table ADDL3 WTH4,BLKTAB,EORBLK SUBL2 #4,EORBLK ; initialise EORBLK to last block of ; first row MOVC5 #0,STRLEN,#0,AREA,@BLKTAB ; clear table of base-addresses RET .SBTTL Matrix-loading routine .ENTRY LOAD,^M ; entry mask CLRL R3 ; clear R3 for coming EDIV MOVL 8(AP),R2 ; X-coord. to R2+R3 EDIV #40,R2,R4,R7 ; X of block to R4, X-bit in block to R7 OUTEST R4,LENGTH ; X<0 or X>=LENGTH? If so, go to OUT MOVL 4(AP),R2 ; Y-coord. to R2+R3 EDIV #24,R2,R6,R8 ; Y of block to R6, Y-bit in block to R8 OUTEST R6,WIDTH ; Y<0 or Y>=WIDTH? If so, go to OUT MULL2 WIDTH,R4 ; calculate the actual... ADDL2 R4,R6 ; ...number of the block... MULL2 #4,R6 ; ...and its displ. from table base ADDL2 BLKTAB,R6 ; ...and the address of its base address MULL2 #3,R7 ; calculate base byte of field TSTL (R6) ; does the block exist? (is it <>0?) BNEQ DOT ; if it exists, go to DOT LOOP2: PUSHL R6 ; address of base-address of block PUSHAL BLKSIZE ; push blocksize address CALLS #2,G^LIB$GET_VM ; allocate memory BLBC R0,LOOP2 ; try again if there isn't any MOVC5 #0,STRBASE,#0,BLKSIZE,@0(R6) ; clear new block (STRBASE serves as a ; dummy address) DOT: INSV #1,R8,#1,@0(R6)[R7] ; insert bit at desired location OUT: RET .SBTTL Output routine .ENTRY DUMP,^M ; entry mask MOVC5 #0,STRBASE,#64,#133,@STRBASE MOVL #1,R2 ; set end-of-line flag (R2) MOVL EORBLK,R3 ; last block of row to R3 MOVL WTH4M1,R4 ; character counter set to max. (R4) MULL3 #3,BITROW,R5 ; base-byte of blocks for this line CLRL @STRLEN ; clear string-length buffer 10$: MOVL #18,R6 ; bit-field counter 20$: TSTL (R3) ; does the block exist? BNEQ 40$ ; if so, go to 40$ ACBB #0,#-4,R4,25$ ; subtract 4 from R4; goto 25$ if >0 BRW 60$ ; BLSS 60$ impossible (displ. too large) 25$: SUBL2 #4,R3 ; point R3 to address of next block BRB 20$ ; check next block 40$: EXTZV R6,#6,@0(R3)[R5],R7 ; extract value and put it in R7 BEQL 52$ ; if R7=0 go to 52$ BLBC R2,45$ ; skip next bit if R2 clear ADDL3 #1,R4,R8 ; index for plot-indicator CLRL R2 ; clear R2 flag ;************************************************************************ ;************************************************************************ ;*****THE FOLLOWING THREE LINES OF CODE SHOULD BE DELETED IF YOUR******** ;*****PRINTER'S DEVICE HANDLER PASSES THE CHARACTER. SEE********** ;*****THE VPLOT GUIDE FOR FURTHER INFORMATION...************************* ;************************************************************************ ;45$: CMPL #63,R7 ; contents of field=63? ; BNEQ 50$ ; if not, skip next part ; MOVL #191,R7 ; substitute 191 for the field's content 45$: ;************************************************************************ ;************************************************************************ 50$: ADDL2 #64,R7 ; set the #7 bit required for plot-mode MOVB R7,@STRBASE[R4] ; move data byte to the character-string 52$: DECL R4 ; next character BLSS 57$ ; branch to 57$ if out of characters ACBB #0,#-6,R6,40$ ; decrement field-counter; to 40$ if>=0 CMPL BITROW,#39 ; does BITROW indicate that this is the ; last row in the block? BNEQ 55$ ; if not, skip this next part FREEBLK R3,BLKSIZE ; call macro to return the block's ; memory 55$: SUBL2 #4,R3 ; move block-counter to next block BRW 10$ ; branch to 10$ 57$: CMPL #39,BITROW ; last row in block? BNEQ 60$ ; if not, to 60$ FREEBLK R3,BLKSIZE ; else, return block 60$: INCL BITROW ; next bit-row CMPL #40, BITROW ; BITROW=40? BNEQ 70$ ; exit if not, else... CLRL BITROW ; BITROW=0 ADDL2 WTH4,EORBLK ; set EORBLK to end of next line CMPL EORBLK,TABEND ; beyond end of block-table? BLEQ 70$ ; exit if not CLRB @LASTADR ; set end-of-plot indicator MOVL BLKTAB,R3 FREEBLK R3,AREA ; return block-table 70$: BLBC R2,LEAVE MOVL R2,R8 LEAVE: MOVB #5,@STRBASE[R8] ADDL3 #1,R8,@STRLEN RET .TITLE LIB_GETS High Level Language memory access routines .IDENT /V01.03/ ;++LIBGETS.MAR ; ; Facility: ; Fermilab Accelerator Control System (ACNET) General Library ; ; Abstract: ; This is a package of functions callable from any High Level Language ; (i.e., FORTRAN) to access items in data structures in memory in an ; indirect fashion where the address of the item or data structure is ; stored in variable (value of the variable is itself an address). ; ; Environment: ; Stored in FERMILIB.OLB and linked into users' programs. No access ; checks are made: assumes incorrect addressing is caught by access ; violations. ; ;-- ; ; Modification History: ; ; Author: F. Nagy Creation date: 19-Sep-82 ; ; V01.00 19-Sep-82 FJN Created to form a single compact module for ; many uses. ; V01.01 09-Oct-82 FJN Fix problem, define GET_NOTNDX label ; V01.02 12-Oct-82 FJN Fix bad, bad bug run into by Lin. ; V01.03 15-Apr-83 FJN Standardize header help comments ; .PAGE .SUBTITLE Declarations ; ; Include Files: ; .LIBRARY "SYS$LIBRARY:LIB.MLB" ;To allow use of CASE macro ; ; Library Macros: ; ; NONE ; ; Local Macros: ; ; NONE ; ; Equated Symbols: ; nargs = 0 ;Offset to number of arguments in list get_loc = 4 ;Offset to location argument get_ndx = 8 ;Offset to index argument num_loc = get_loc/4 ;Argument number of location argument ; ; Program section for code ; .PSECT _LIB_CODE,PIC,USR,CON,REL,LCL,SHR,EXE,NOWRT,RD .SHOW BINARY .PAGE .SUBTITLE Entry points for GET routines ;+0LIB_GET_XXXX ; ; Functional Description: ; Get a signed value from a specified memory location or from an array ; whose base memory location and item index are given. The data types ; of the item (XXXX) are BYTE, WORD, LONG, and QUAD. ; ; Calling Sequence: ; value = LIB_GET_XXXX( location [,index] ) ; ; Input Parameters: ; location - address of a longword which contains the address of the ; desired item's memory location or the address of the base ; of an array containing the item. ; index - address of a longword which contains the index of the item in ; the array whose base address is given by location. If this ; optional argument is used, then indexed addressing is used. ; ; Implicit Inputs: ; NONE ; ; Output Parameters: ; value - value of the item at the specified memory/array location. ; For BYTE, WORD, and LONG this is returned as a signed longword ; value in register R0. For QUAD data types this is returned ; in registers R0 and R1. ; ; Implicit Outputs: ; NONE ; ; Condition Codes: ; NONE ; ; Side Effects: ; NONE ; ;- ;+ LIB_GET_BYTE ; Return a byte value from a memory location or an indexed array. ; ; value.wb.v = LIB_GET_BYTE( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the byte in memory ; or of the start of the array of bytes. Passed by reference. ; ; index is an optional argument which indicates that an array of ; bytes is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the byte ; in the array. If the index argument is not used, then ; location gives the address of the byte itself. Passed by ; reference. ; ; value the byte data value is returned as a sign-extended longword. ; Passed by value. ; ;- .ENTRY LIB_GET_BYTE,^M CLRL R0 ;Case 0 is get signed byte BRB GET_COMMON ;+ LIB_GET_WORD ; Return a word value from a memory location or an indexed array. ; ; value.ww.v = LIB_GET_WORD( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the word in memory ; or of the start of the array of words. Passed by reference. ; ; index is an optional argument which indicates that an array of ; words is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the word ; in the array. If the index argument is not used, then ; location gives the address of the word itself. Passed by ; reference. ; ; value the word data value is returned as a sign-extended longword. ; Passed by value. ; ;- .ENTRY LIB_GET_WORD,^M MOVB #1,R0 ;Case 1 is get signed word BRB GET_COMMON ;+ LIB_GET_LONG ; Return a longword value from a memory location or an indexed array. ; ; value.wl.v = LIB_GET_LONG( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the longword in ; memory or of the start of the array of longwords. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; longwords is to be accessed by indexed addressing. The ; index argument is a longword which contains the index of ; the longword in the array. If the index argument is not ; used, then location gives the address of the longword ; itself. Passed by reference. ; ; value the returned longword data value. Passed by value. ; ;- .ENTRY LIB_GET_LONG,^M MOVB #2,R0 ;Case 2 is get signed/unsigned longword BRB GET_COMMON ;+ LIB_GET_QUAD ; Return a quadword value from a memory location or an indexed array. ; ; value.wq.v = LIB_GET_QUAD( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the quadword in ; memory or of the start of the array of quadwords. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; quadwords is to be accessed by indexed addressing. The ; index argument is a longword which contains the index of ; the quadword in the array. If the index argument is not ; used, then location gives the address of the quadword ; itself. Passed by reference. ; ; value the returned quadword data value. Passed by value. ; ;- .ENTRY LIB_GET_QUAD,^M MOVB #3,R0 ;Case 3 is get quadword BRB GET_COMMON .PAGE .SUBTITLE Entry points for GETZE routines ;+0LIB_GETZE_XXXX ; ; Functional Description: ; Get an unsigned value from a specified memory location or from an array ; whose base memory location and item index are given. The data types ; of the item (XXXX) are BYTE or WORD. ; ; Calling Sequence: ; value = LIB_GETZE_XXXX( location [,index] ) ; ; Input Parameters: ; location - address of a longword which contains the address of the ; desired item's memory location or the address of the base ; of an array containing the item. ; index - address of a longword which contains the index of the item in ; the array whose base address is given by location. If this ; optional argument is used, then indexed addressing is used. ; ; Implicit Inputs: ; NONE ; ; Output Parameters: ; value - value of the item at the specified memory/array location. ; The value is returned zero-extended (unsigned) as a longword ; in Register R0. ; ; Implicit Outputs: ; NONE ; ; Condition Codes: ; NONE ; ; Side Effects: ; NONE ; ;- ;+ LIB_GETZE_BYTE ; Return a byte value from a memory location or an indexed array. ; ; value.wlu.v = LIB_GETZE_BYTE( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the byte in memory ; or of the start of the array of bytes. Passed by reference. ; ; index is an optional argument which indicates that an array of ; bytes is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the byte ; in the array. If the index argument is not used, then ; location gives the address of the byte itself. Passed by ; reference. ; ; value the byte data value is returned as a zero-extended or ; unsigned longword in register R0. Passed by value. ; ;- .ENTRY LIB_GETZE_BYTE,^M MOVB #4,R0 ;Case 4 is get unsigned byte BRB GET_COMMON ;+ LIB_GETZE_WORD ; Return a word value from a memory location or an indexed array. ; ; value.wlu.v = LIB_GETZE_WORD( location.ra.r [,index.rl.r] ) ; ; location longword which contains the address of the word in memory ; or of the start of the array of words. Passed by reference. ; ; index is an optional argument which indicates that an array of ; words is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the word ; in the array. If the index argument is not used, then ; location gives the address of the word itself. Passed by ; reference. ; ; value the word data value is returned as a zero-extended or ; unsigned longword in register R0. Passed by value. ; ;- .ENTRY LIB_GETZE_WORD,^M MOVB #5,R0 ;Case 5 is get unsigned word .PAGE .SUBTITLE Common code for all GET routines ; ; This common code determines whether straight or indexed addressing modes ; are to be used to access the data. This decision is based on the presence ; of the index argument (must also be non-defaulted). ; GET_COMMON: MOVL @get_loc(AP),R2 ;Get address of data item CMPB nargs(AP),#num_loc ;Is there an index argument? BLEQ GET_NOTNDX ;If not, use non-indexed addressing TSTL get_ndx(AP) ;Is the index argument defaulted? BEQL GET_NOTNDX ;If so, use non-indexed addressing MOVL @get_ndx(AP),R1 ;Get index value BEQL GET_NOTNDX ;If zero, use non-indexed addressing ; (for speed?) ; ; Fall throught to CASE for indexed addressing for the various data types ; .PAGE .SUBTITLE CASE for indexed addressing ; ; CASE for indexed addressing for the various data types ; CASE R0,,type=B ; GETNDX_BYTE: CVTBL (R2)[R1],R0 ;Get sign-extended byte RET ; GETNDX_WORD: CVTWL (R2)[R1],R0 ;Get sign-extended word RET ; GETNDX_LONG: MOVL (R2)[R1],R0 ;Get longword RET ; GETNDX_QUAD: MOVQ (R2)[R1],R0 ;Get quadword into two registers RET ; GZENDX_BYTE: MOVZBL (R2)[R1],R0 ;Get zero-extended byte RET ; GZENDX_WORD: MOVZWL (R2)[R1],R0 ;Get zero-extended word RET .PAGE .SUBTITLE CASE for non-indexed addressing ; ; CASE for non-indexed addressing for the various data types ; GET_NOTNDX: CASE R0,,- type=B ; GET_BYTE: CVTBL (R2),R0 ;Get sign-extended byte RET ; GET_WORD: CVTWL (R2),R0 ;Get sign-extended word RET ; GET_LONG: MOVL (R2),R0 ;Get longword RET ; GET_QUAD: MOVQ (R2),R0 ;Get quadword into two registers RET ; GZE_BYTE: MOVZBL (R2),R0 ;Get zero-extended byte RET ; GZE_WORD: MOVZWL (R2),R0 ;Get zero-extended word RET .TITLE LIB_PUTS High Level Language memory store routines .IDENT /V01.02/ ;++LIBPUTS.MAR ; ; Facility: ; Fermilab Accelerator Control System (ACNET) General Library ; ; Abstract: ; This is a package of procedures callable from any High Level Language ; (i.e., FORTRAN) to store items in data structures in memory in an ; indirect fashion where the address of the item or data structure is ; stored in variable (value of the variable is itself an address). ; ; Environment: ; Stored in FERMILIB.OLB and linked into users' programs. No access ; checks are made: assumes incorrect addressing is caught by access ; violations. ; ;-- ; ; Modification History: ; ; Author: F. Nagy Creation date: 19-Sep-82 ; ; V01.00 19-Sep-82 FJN Created to form a single compact module for ; many uses. ; V01.01 09-Oct-82 FJN Fix problem: define PUT_NOTNDX label ; V01.02 12-Oct-82 FJN Fix problem similar to LIB_GET problem, not ; enough indirection ; .PAGE .SUBTITLE Declarations ; ; Include Files: ; .LIBRARY "SYS$LIBRARY:LIB.MLB" ;To allow use of CASE macro ; ; Library Macros: ; ; NONE ; ; Local Macros: ; ; NONE ; ; Equated Symbols: ; nargs = 0 ;Offset to number of arguments in list put_val = 4 ;Offset to value argument put_loc = 8 ;Offset to location argument put_ndx = 12 ;Offset to index argument num_loc = put_loc/4 ;Argument number of location argument ; ; Program section for code ; .PSECT _LIB_CODE,PIC,USR,CON,REL,LCL,SHR,EXE,NOWRT,RD .SHOW BINARY .PAGE .SUBTITLE Entry points for PUT routines ;+0LIB_PUT_XXXX ; ; Functional Description: ; Store a value into a specified memory location or into an array ; whose base memory location and item index are given. The data types ; of the item (XXXX) are BYTE, WORD, LONG, and QUAD. ; ; Calling Sequence: ; CALL LIB_PUT_XXXX( value, location [,index] ) ; ; Input Parameters: ; value - address of a location containing the data value to be stored ; at the specified memory/array location. The value is ; accessed according to the data type (BYTE, WORD, LONG or QUAD). ; location - address of a longword which contains the address of the ; item's memory location or the address of the base or an ; array in which the data value is to be stored. ; index - address of a longword which contains the index of the item in ; the array whose base address is given by location. If this ; optional argument is used, then indexed addressing is used. ; ; Implicit Inputs: ; NONE ; ; Output Parameters: ; NONE ; ; Implicit Outputs: ; NONE ; ; Condition Codes: ; NONE ; ; Side Effects: ; NONE ; ;- ;+ LIB_PUT_BYTE ; Store a byte value into a memory location or an indexed array. ; ; CALL LIB_PUT_BYTE( value.rb.r, location.ra.r [,index.rl.r] ) ; ; value value to be stored at the specified location in memory ; or an indirectly-referenced array. Passed by reference. ; ; location is the longword which contains the address of the byte ; in memory or of the start of the array of bytes. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; bytes is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the byte ; in the array. If the index argument is not used, then ; location gives the address of where to store the byte. ; Passed by reference. ;- .ENTRY LIB_PUT_BYTE,^M CLRL R0 ;Case 0 is get signed byte BRB PUT_COMMON ;+ LIB_PUT_WORD ; Store a word value into a memory location or an indexed array. ; ; CALL LIB_PUT_WORD( value.rw.r, location.ra.r [,index.rl.r] ) ; ; value value to be stored at the specified location in memory ; or an indirectly-referenced array. Passed by reference. ; ; location is the longword which contains the address of the word ; in memory or of the start of the array of words. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; words is to be accessed by indexed addressing. The index ; argument is a longword which contains the index of the word ; in the array. If the index argument is not used, then ; location gives the address of where to store the word. ; Passed by reference. ;- .ENTRY LIB_PUT_WORD,^M MOVB #1,R0 ;Case 1 is PUT signed word BRB PUT_COMMON ;+ LIB_PUT_LONG ; Store a longword value into a memory location or an indexed array. ; ; CALL LIB_PUT_LONG( value.rl.r, location.ra.r [,index.rl.r] ) ; ; value value to be stored at the specified location in memory ; or an indirectly-referenced array. Passed by reference. ; ; location is the longword which contains the address of the longword ; in memory or of the start of the array of longwords. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; longwords is to be accessed by indexed addressing. The ; index argument is a longword which contains the index of ; the longword in the array. If the index argument is not ; used, then location gives the address of where to store ; the longword. Passed by reference. ;- .ENTRY LIB_PUT_LONG,^M MOVB #2,R0 ;Case 2 is get signed/unsigned longword BRB PUT_COMMON ;+ LIB_PUT_QUAD ; Store a quadword value into a memory location or an indexed array. ; ; CALL LIB_PUT_QUAD( value.rq.r, location.ra.r [,index.rl.r] ) ; ; value value to be stored at the specified location in memory ; or an indirectly-referenced array. Passed by reference. ; ; location is the longword which contains the address of the quadword ; in memory or of the start of the array of quadwords. ; Passed by reference. ; ; index is an optional argument which indicates that an array of ; quadwords is to be accessed by indexed addressing. The ; index argument is a longword which contains the index of ; the quadword in the array. If the index argument is not ; used, then location gives the address of where to store ; the quadword. Passed by reference. ;- .ENTRY LIB_PUT_QUAD,^M MOVB #3,R0 ;Case 3 is get quadword BRB PUT_COMMON .PAGE .SUBTITLE Common code for all PUT routines ; ; This common code determines whether straight or indexed addressing modes ; are to be used to store the data. This decision is based on the presence ; of the index argument (must also be non-defaulted). ; PUT_COMMON: MOVL @put_loc(AP),R2 ;Get address of where to store data CMPB nargs(AP),#num_loc ;Is there an index argument? BLEQ PUT_NOTNDX ;If not, use non-indexed addressing TSTL put_ndx(AP) ;Is the index argument defaulted? BEQL PUT_NOTNDX ;If so, use non-indexed addressing MOVL @put_ndx(AP),R1 ;Get index value BEQL PUT_NOTNDX ;If zero, use non-indexed addressing ; (for speed?) ; ; Fall throught to CASE for indexed addressing for the various data types ; .PAGE .SUBTITLE CASE for indexed addressing ; ; CASE for indexed addressing for the various data types ; CASE R0,,type=B ; PUTNDX_BYTE: MOVB @put_val(AP),(R2)[R1] ;Store byte RET ; PUTNDX_WORD: MOVW @put_val(AP),(R2)[R1] ;Store word RET ; PUTNDX_LONG: MOVL @put_val(AP),(R2)[R1] ;Store longword RET ; PUTNDX_QUAD: MOVQ @put_val(AP),(R2)[R1] ;Store quadword RET .PAGE .SUBTITLE CASE for non-indexed addressing ; ; CASE for non-indexed addressing for the various data types ; PUT_NOTNDX: CASE R0,,type=B ; PUT_BYTE: MOVB @put_val(AP),(R2) ;Store byte RET ; PUT_WORD: MOVW @put_val(AP),(R2) ;Store word RET ; PUT_LONG: MOVL @put_val(AP),(R2) ;Store longword RET ; PUT_QUAD: MOVQ @put_val(AP),(R2) ;Store quadword RET .END