Or, is it dynamic (i.e. "floating point"
Thanks
Posted Mon Aug 29, 2011 3:19 PM
Posted Mon Aug 29, 2011 3:24 PM
Willsy, on Mon Aug 29, 2011 3:19 PM, said:
Edited by sometimes99er, Mon Aug 29, 2011 3:36 PM.
Posted Mon Aug 29, 2011 3:55 PM
adamantyr, on Mon Aug 29, 2011 3:32 PM, said:
Posted Mon Aug 29, 2011 4:09 PM
Willsy, on Mon Aug 29, 2011 3:55 PM, said:
Posted Mon Aug 29, 2011 4:23 PM
Posted Mon Aug 29, 2011 4:27 PM
;[ GPLLNK ; This routine is based on the routine published in the July 1986 edition of ; Smart Programmer. Modified by yours truly to allow it be executed from ROM. gplws equ >83e0 ; GPL workspace gr4 equ gplws+8 ; GPL R4 gr6 equ gplws+12 ; GPL R6 stkpnt equ >8373 ; GPL stack pointer ldgadd equ >60 ; load and execute grom address entry point xtab27 equ >200e ; low mem XML table location 27 getstk equ >166c ; cpu register data - this data is copied into >200e onwards, so that it sits ; in R7 onwards gpllnk data glnkws ; [mapped to R7] set up BLWP vectors data glink1 ; [mapped to R8] rtnad data xmlrtn ; [mapped to R9] gxmlad data >176c ; [mapped to R10] GROM address for GPL XML 0F27 opcode data >50 ; [mapped to R11] Initialised to >50 where PUTSTK ; address resides ; this routine runs in it's own workspace, starting at >2000 glnkws equ >2000 ; GPLLNKs workspace of which only registers R7 thru R15 ; are used glink1 li r0,gpllnk ; we need to copy the cpu register data (above) to li r1,>200e ; RAM. R0=Source, R1=Destination li r2,5 ; R2=Word count gpllop mov *r0+,*r1+ ; copy the data above into r7 onwards... dec r2 ; copied all of it? jne gpllop ; loop if not mov *r11,@gr4 ; put PUTSTK address into R4 of GPL WS mov *r14+,@gr6 ; put GPL routine address in r6 of GPL WS mov r9,@xtab27 ; put XMLRTN address into >200e lwpi gplws ; load GPL workspace bl *r4 ; save current GROM address on stack mov @gxmlad,@>8302(r4) ; push GPL XML address on stack for GPL return inct @stkpnt ; adjsut the stack pointer b @ldgadd ; execute our GPL routine xmlrtn mov @getstk,r4 ; get GETSTK pointer bl *r4 ; restore GROM address off the stack lwpi glnkws ; load our ws rtwp ; all done - return to caller ;]
Posted Mon Aug 29, 2011 4:34 PM
Willsy, on Mon Aug 29, 2011 4:27 PM, said:
;[ GPLLNK
; This routine is based on the routine published in the July 1986 edition of
; Smart Programmer. Modified by yours truly to allow it be executed from ROM.
gplws equ >83e0 ; GPL workspace
gr4 equ gplws+8 ; GPL R4
gr6 equ gplws+12 ; GPL R6
stkpnt equ >8373 ; GPL stack pointer
ldgadd equ >60 ; load and execute grom address entry point
xtab27 equ >200e ; low mem XML table location 27
getstk equ >166c
; cpu register data - this data is copied into >200e onwards, so that it sits
; in R7 onwards
gpllnk data glnkws ; [mapped to R7] set up BLWP vectors
data glink1 ; [mapped to R8]
rtnad data xmlrtn ; [mapped to R9]
gxmlad data >176c ; [mapped to R10] GROM address for GPL XML 0F27 opcode
data >50 ; [mapped to R11] Initialised to >50 where PUTSTK
; address resides
; this routine runs in it's own workspace, starting at >2000
glnkws equ >2000 ; GPLLNKs workspace of which only registers R7 thru R15
; are used
glink1 li r0,gpllnk ; we need to copy the cpu register data (above) to
li r1,>200e ; RAM. R0=Source, R1=Destination
li r2,5 ; R2=Word count
gpllop mov *r0+,*r1+ ; copy the data above into r7 onwards...
dec r2 ; copied all of it?
jne gpllop ; loop if not
mov *r11,@gr4 ; put PUTSTK address into R4 of GPL WS
mov *r14+,@gr6 ; put GPL routine address in r6 of GPL WS
mov r9,@xtab27 ; put XMLRTN address into >200e
lwpi gplws ; load GPL workspace
bl *r4 ; save current GROM address on stack
mov @gxmlad,@>8302(r4) ; push GPL XML address on stack for GPL return
inct @stkpnt ; adjsut the stack pointer
b @ldgadd ; execute our GPL routine
xmlrtn mov @getstk,r4 ; get GETSTK pointer
bl *r4 ; restore GROM address off the stack
lwpi glnkws ; load our ws
rtwp ; all done - return to caller
;]
Posted Mon Aug 29, 2011 5:11 PM
adamantyr, on Mon Aug 29, 2011 4:09 PM, said:
Willsy, on Mon Aug 29, 2011 3:55 PM, said:
Posted Mon Aug 29, 2011 5:48 PM
Vorticon, on Mon Aug 29, 2011 5:11 PM, said:
adamantyr, on Mon Aug 29, 2011 4:09 PM, said:
Willsy, on Mon Aug 29, 2011 3:55 PM, said:
Posted Mon Aug 29, 2011 8:59 PM
Posted Tue Aug 30, 2011 12:40 AM
RXB, on Mon Aug 29, 2011 4:34 PM, said:
Willsy, on Mon Aug 29, 2011 4:27 PM, said:
; This routine is based on the routine published in the July 1986 edition of ; Smart Programmer. Modified by yours truly to allow it be executed from ROM.
Posted Tue Aug 30, 2011 1:38 AM
Willsy, on Tue Aug 30, 2011 12:40 AM, said:
RXB, on Mon Aug 29, 2011 4:34 PM, said:
Willsy, on Mon Aug 29, 2011 4:27 PM, said:
; This routine is based on the routine published in the July 1986 edition of ; Smart Programmer. Modified by yours truly to allow it be executed from ROM.
Posted Tue Aug 30, 2011 4:45 AM
sometimes99er, on Tue Aug 30, 2011 1:38 AM, said:
Willsy, on Tue Aug 30, 2011 12:40 AM, said:
RXB, on Mon Aug 29, 2011 4:34 PM, said:
Willsy, on Mon Aug 29, 2011 4:27 PM, said:
; This routine is based on the routine published in the July 1986 edition of ; Smart Programmer. Modified by yours truly to allow it be executed from ROM.
0 members, 0 guests, 0 anonymous users