Commit f54f65e1 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Use Push/Pull macros

This gets rid of ~200 mixed UAL warnings without having to use the -nowarn switch, which could hide some genuine warnings needing attention.
PUSH and POP are synonyms for their STM and LDM equivalent, according to the ARM ARM.
Version number bumped to +0.01 greater than Tank's latest binary.

Version 0.58. Tagged as 'GPIO-0_58'
parent 2241ad56
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.54"
Module_Version SETA 54
Module_MajorVersion SETS "0.58"
Module_Version SETA 58
Module_MinorVersion SETS ""
Module_Date SETS "09 Oct 2014"
Module_ApplicationDate SETS "09-Oct-14"
Module_ComponentName SETS "GPIO"
Module_ComponentPath SETS "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
Module_FullVersion SETS "0.54"
Module_HelpVersion SETS "0.54 (09 Oct 2014)"
Module_FullVersion SETS "0.58"
Module_HelpVersion SETS "0.58 (09 Oct 2014)"
END
/* (0.54)
/* (0.58)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.54
#define Module_MajorVersion_CMHG 0.58
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Oct 2014
#define Module_MajorVersion "0.54"
#define Module_Version 54
#define Module_MajorVersion "0.58"
#define Module_Version 58
#define Module_MinorVersion ""
#define Module_Date "09 Oct 2014"
......@@ -18,6 +18,6 @@
#define Module_ComponentName "GPIO"
#define Module_ComponentPath "bsd/RiscOS/Sources/ThirdParty/TankStage/HWSupport/GPIO"
#define Module_FullVersion "0.54"
#define Module_HelpVersion "0.54 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:54"
#define Module_FullVersion "0.58"
#define Module_HelpVersion "0.58 (09 Oct 2014)"
#define Module_LibraryVersionInfo "0:58"
......@@ -34,7 +34,7 @@
Read_Data
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Read_Data ;
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
BL get_logical_and_pin ;
CMP r0,#-1 ;
BEQ %FT10 ;
......@@ -51,7 +51,7 @@ Read_Data
AND r0,r0,r1 ;mask just ours
CMP r0,#0 ;
MOVNE r0,#1 ;
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=value (0 or 1) -1 if not GPIO
;---------------------------------------------
......@@ -62,7 +62,7 @@ Read_Data
Write_Data
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Write_Data ;
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
MOV r7,r1 ;save value
BL check_protect_i2c ;
CMP r0,#-1 ;
......@@ -82,7 +82,7 @@ Write_Data
CMP r7,#0 ;check flag
STRNE r1,[r0,r4] ;set data bit
STREQ r1,[r0,r5] ;unset data bit
10 POP {r2-r10,pc} ; restore registers and exit
10 Pull "r2-r10,pc" ; restore registers and exit
;r0= -1 if input , protected or not GPIO
;or
;r0=logical address
......@@ -94,7 +94,7 @@ Write_Data
Read_OE
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Read_OE ;
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
BL get_logical_and_pin ;
CMP r0,#-1 ;
BEQ %FT10 ;
......@@ -105,7 +105,7 @@ Read_OE
AND r0,r0,r1 ;
CMP r0,#0 ;is it output ?
MOVNE r0,#1 ;opposite logic to match Pi
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=value (0=output,1=input)
;---------------------------------------------
......@@ -115,18 +115,18 @@ Read_OE
Write_OE
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Write_OE ;
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
SWI XOS_IntOff
MOV r7,r1 ;save value
BL check_protect_i2c ;
CMP r0,#-1 ;
BEQ %FT10 ;
PUSH {r0} ;
Push "r0" ;
BL get_table ;
BL find_register ;
TST r0,#input_only ;
MOVNE r7,#1 ;
POP {r0} ;
Pull "r0" ;
BL get_logical_and_pin ;
CMP r0,#-1 ;
BEQ %FT10 ;
......@@ -140,14 +140,14 @@ Write_OE
STR r3,[r0,r6] ;save back
MOV r0,#0 ;
10 SWI XOS_IntOn
POP {r1-r10,pc} ; restore registers and exit
Pull "r1-r10,pc" ; restore registers and exit
;r0=0 if ok -1 if protected
;----------------------------------------------
; MapAuxIn
;r0=mode
Aux_As_GPIO
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#aux_pins] ;get list of pins
common CMP r6,#-1 ;
......@@ -178,12 +178,12 @@ common1
MOV r1,#0 ;set output to off
BL Write_Data ;write data
B %BT10 ;next
20 POP {r0-r10,pc} ; restore registers and exit
20 Pull "r0-r10,pc" ; restore registers and exit
;---------------------------------------------
; MapExpIn
;r0=mode
Exp_As_GPIO
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#exp_pins] ;get list of pins
B common ;
......@@ -192,14 +192,14 @@ Exp_As_GPIO
; MapCameraIn
;r0=mode
Camera_As_GPIO
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#camera_pins] ;get list of pins
B common ;
;---------------------------------------------
; SafeAuxIn
Aux_As_Safe
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#aux_pins] ;get list of pins
safe CMP r6,#-1 ;
......@@ -207,25 +207,25 @@ safe CMP r6,#-1 ;
MOV r3,#safemode ;safe mode
MOV r7,#&FF ;skip OE write
B common1 ;
20 POP {r0-r10,pc} ; restore registers and exit
20 Pull "r0-r10,pc" ; restore registers and exit
;---------------------------------------------
; SafeExpIn
Exp_As_Safe
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#exp_pins] ;get list of pins
B safe ;
;---------------------------------------------
; SafecameraIn
Camera_As_Safe
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
BL get_table ;
LDR r6,[r1,#camera_pins] ;get list of pins
B safe ;
;---------------------------------------------
;
Aux_As_USB
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r7,#usb_pins ;
set_pins
BL get_table ;
......@@ -239,29 +239,29 @@ set_pins
MOV r1,r1,LSR #8 ;just mode
BL Write_Mode
B %BT10
20 POP {r0-r10,pc} ; restore registers and exit
20 Pull "r0-r10,pc" ; restore registers and exit
;---------------------------------------------
;
Exp_As_UART
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r7,#uart_pins ;
B set_pins ;
;---------------------------------------------
;
Aux_As_MMC
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r7,#mmc_aux_pins ;
B set_pins ;
;---------------------------------------------
; mode2AuxIn
Exp_As_MMC
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r7,#mmc_exp_pins ;
B set_pins ;
;---------------------------------------------
; mode3AuxIn
Aux_As_MM
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r7,#mm_pins ;
B set_pins ;
;---------------------------------------------
......@@ -270,7 +270,7 @@ Aux_As_MM
Read_Mode
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Read_Mode
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r5,#1 ; read/write flag
;r5=read or write (1/0)
;r6=mode to write
......@@ -286,7 +286,7 @@ modecommon
STREQH r6,[r1,r4] ; write half word
LDRNEH r0,[r1,r4] ; read half word
MOVEQ r0,r6
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=mode (-1=not ours)
;---------------------------------------------
;WriteMode
......@@ -295,13 +295,13 @@ modecommon
Write_Mode
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Write_Mode
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r6,r1 ; preserve data
BL check_protect_i2c ;
MOV r5,#0 ; read/write flag
CMP r0,#-1 ;
BNE modecommon ;
POP {r1-r10,pc} ; restore registers and exit
Pull "r1-r10,pc" ; restore registers and exit
;r0=mode (-1=not ours)
;---------------------------------------------
;ReadLevel0
......@@ -309,7 +309,7 @@ Write_Mode
Read_Level0
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Read_Polarity
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_leveldetect0 ;register
;r5=read or write (1,0)
......@@ -332,7 +332,7 @@ levelcommon
AND r0,r4,r1 ;
CMP r0,#0 ;
MOVNE r0,#1 ;
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=mode
;---------------------------------------------
;WriteLevel0
......@@ -341,7 +341,7 @@ levelcommon
Write_Level0
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Write_Polarity
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r8,#proc_leveldetect0 ;register
write_register
MOV r7,#0 ; read/write flag
......@@ -351,7 +351,7 @@ write_register
BL check_protect_i2c ;
CMP r0,#-1 ;
BNE levelcommon ;
POP {r1-r10,pc} ; restore registers and exit
Pull "r1-r10,pc" ; restore registers and exit
;r0=mode or -1 if protected
;preserves all others
;---------------------------------------------
......@@ -360,7 +360,7 @@ write_register
Read_Level1
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Read_Pull
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_leveldetect1 ;register
B levelcommon ;
......@@ -371,14 +371,14 @@ Read_Level1
Write_Level1
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_Write_Pull
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r8,#proc_leveldetect1 ;register
B write_register ;
;---------------------------------------------
;ReadRising
;r0=GPIO number
Read_Rising
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_risingdetect ;register
B levelcommon ;
......@@ -387,14 +387,14 @@ Read_Rising
;r0=GPIO number
;r1=0/1
Write_Rising
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r8,#proc_risingdetect ;register
B write_register ;
;---------------------------------------------
;ReadFallin
;r0=GPIO number
Read_Falling
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_fallingdetect ;register
B levelcommon ;
......@@ -403,14 +403,14 @@ Read_Falling
;r0=GPIO number
;r1=0/1
Write_Falling
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r8,#proc_fallingdetect ;register
B write_register ;
;---------------------------------------------
;ReadDebounceEnable
;r0=GPIO number
Read_DebounceEnable
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_debounceenable ;register
B levelcommon ;
......@@ -419,14 +419,14 @@ Read_DebounceEnable
;r0=GPIO number
;r1=0/1
Write_DebounceEnable
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r8,#proc_debounceenable ;register
B write_register ;
;---------------------------------------------
;ReadIRQ1
;r0=GPIO number
Read_IRQ1
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_irqstatus1 ;
B levelcommon ;
......@@ -435,7 +435,7 @@ Read_IRQ1
;r0=GPIO number
;r1=0/1
Write_IRQ1
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,r1 ;
BL check_protect_i2c ;
CMP r0,#-1 ;
......@@ -455,14 +455,14 @@ irqcommon
STRNE r1,[r0,r5] ;set irq bit
STREQ r1,[r0,r4] ;unset irq bit
MOV r0,#0 ;
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=0 if ok -1 if protected
;preserves all others
;---------------------------------------------
;ReadIRQ2
;r0=GPIO number
Read_IRQ2
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,#1 ; read/write flag
MOV r8,#proc_irqstatus2 ;
B levelcommon ;
......@@ -471,7 +471,7 @@ Read_IRQ2
;r0=GPIO number
;r1=0/1
Write_IRQ2
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r7,r1 ;
BL check_protect_i2c ;
BEQ %FT10 ;
......@@ -484,7 +484,7 @@ Write_IRQ2
LDRH r5,[r2,#proc_setirqenable2] ;
LDRH r4,[r2,#proc_clearirqenable2] ;
B irqcommon
10 POP {r1-r10,pc} ; restore registers and exit
10 Pull "r1-r10,pc" ; restore registers and exit
;r0=0 if ok -1 if protected
;preserves all others
;---------------------------------------------
......@@ -492,7 +492,7 @@ Write_IRQ2
Read_Exp_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_ReadBlock ;
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
BL get_table ;
LDR r0,[r1,#widebit_pins] ;get list of pins
CMP r0,#-1 ;check if exists
......@@ -518,7 +518,7 @@ commonread32
AND r0,r3,r4 ;just our pins again
AND r0,r0,r5 ;just our pins
MOV r1,r5 ;give user the bitmask
10 POP {r2-r10,pc} ; restore registers and exit
10 Pull "r2-r10,pc" ; restore registers and exit
;r0=data state
;r1=bitmask
;preserves all others
......@@ -528,7 +528,7 @@ commonread32
Read_Aux_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_ReadByte ;
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
BL get_table ;
LDR r0,[r1,#widebit_pins] ;get list of pins
CMP r0,#-1 ;check if exists
......@@ -542,7 +542,7 @@ Read_Aux_32
;---------------------------------------------
;Readcam32
Read_Cam_32
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
BL get_table ;
LDR r0,[r1,#widebit_pins] ;get list of pins
CMP r0,#-1 ;check if exists
......@@ -559,7 +559,7 @@ Read_Cam_32
Write_Exp_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_WriteBlock ;
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,exp_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_139 ;check mapped in
......@@ -579,7 +579,7 @@ common32
STRNE r3,[r0,r4] ;unset them
ANDS r4,r6,r7 ;just our pins
STRNE r4,[r0,r5] ;set them
10 POP {r0-r10,pc} ; restore registers and exit
10 Pull "r0-r10,pc" ; restore registers and exit
;preserves all registers
exp_bitmap DCD expbitmap
;---------------------------------------------
......@@ -588,7 +588,7 @@ exp_bitmap DCD expbitmap
Write_Aux_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_WriteByte ;
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,aux_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_12 ;check mapped in
......@@ -599,7 +599,7 @@ aux_bitmap DCD auxbitmap
;writecam32
;r0=bits to set/unset
Write_Cam_32
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,cam_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_96 ;check mapped in
......@@ -611,7 +611,7 @@ cam_bitmap DCD cambitmap
Read_Exp_OE_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_ReadBlockOE ;
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
LDR r5,exp_bitmap ;get mask
MOV r0,#gpio_139 ;check mapped in
commonoeread32
......@@ -624,7 +624,7 @@ commonoeread32
LDR r0,[r0,r6] ;get register value
AND r0,r0,r5 ;just our pins
MOV r1,r5 ;give user bitmask
10 POP {r2-r10,pc} ; restore registers and exit
10 Pull "r2-r10,pc" ; restore registers and exit
;r0=bitmask of OE register
;r1=bitmask
;preserves all others
......@@ -634,7 +634,7 @@ commonoeread32
Read_Aux_OE_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_ReadByteOE ;
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
LDR r5,aux_bitmap ;get mask
MOV r0,#gpio_12 ;check maped in
B commonoeread32
......@@ -645,7 +645,7 @@ Read_Aux_OE_32
;readcamoe32
;r0=bits to set/unset
Read_Cam_OE_32
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
LDR r5,cam_bitmap ;get mask
MOV r0,#gpio_96 ;check maped in
B commonoeread32
......@@ -658,7 +658,7 @@ Read_Cam_OE_32
Write_Exp_OE_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_WriteBlockOE ;
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,exp_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_139 ;check maped in
......@@ -678,7 +678,7 @@ commonoe32
AND r2,r2,r3 ;clears all our outputs
ORR r1,r2,r4 ;set/unset our pins
STR r1,[r0,r5] ;
10 POP {r0-r10,pc} ; restore registers and exit
10 Pull "r0-r10,pc" ; restore registers and exit
;preserves all registers
;---------------------------------------------
;writeauxoe32
......@@ -686,7 +686,7 @@ commonoe32
Write_Aux_OE_32
CMP r0,#i2c_flag-1 ;check if i2c gpio
BCS i2c_WriteByteOE ;
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,aux_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_12 ;check maped in
......@@ -696,7 +696,7 @@ Write_Aux_OE_32
;writecamoe32
;r0=bits to set/unset
Write_Cam_OE_32
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
LDR r7,cam_bitmap ;get mask
MOV r6,r0 ;keep bitmap
MOV r0,#gpio_96 ;check maped in
......@@ -705,9 +705,9 @@ Write_Cam_OE_32
;---------------------------------------------
;r0=GPIO
Address
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
BL get_logical_and_pin ;
POP {r2-r10,pc} ;
Pull "r2-r10,pc" ;
;r0=Logical
;r1=Mask
;---------------------------------------------
......@@ -716,7 +716,7 @@ Address
;r1=pointer to buffer
;r2=size
sramread
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
ADD r3,r0,r2 ;check address
CMP r3,#sramsize ;
BGE %FT10 ;bad address
......@@ -731,14 +731,14 @@ sramread
SUB r5,r5,#1 ;dec pointer
CMP r2,r0 ;last byte ?
BGE %BT20 ;
10 POP {r0-r10,pc} ;
10 Pull "r0-r10,pc" ;
;---------------------------------------------
;sramwrite
;r0=pointer to sram to write
;r1=pointer to buffer
;r2=size
sramwrite
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
ADD r3,r0,r2 ;check address
CMP r3,#sramsize ;
BGE %FT10 ;bad address
......@@ -753,13 +753,13 @@ sramwrite
SUB r5,r5,#1 ;dec pointer
CMP r2,r0 ;last byte ?
BGE %BT20 ;
10 POP {r0-r10,pc} ;
10 Pull "r0-r10,pc" ;
;---------------------------------------------
;loadconfig
;r0 pointer to list
Load_Config
PUSH {r0-r10,lr} ;
Push "r0-r10,lr" ;
MOV r4,r0
10 LDR r0,[r4],#4 ;get first word
CMP r0,#-1 ;last ?
......@@ -821,14 +821,14 @@ Load_Config
MOV r0,r5 ;gpio number
BL Write_IRQ2 ;
B %BT10 ;
20 POP {r0-r10,pc} ;
20 Pull "r0-r10,pc" ;
;preserves all registers
;---------------------------------------------
;readconfig
;r0 pointer for list or -1 for my space
;r1 extended or normal flag
Read_Config
PUSH {r2-r10,lr} ;
Push "r2-r10,lr" ;
CMP r0,#-1 ;my space or yours
ADDEQ r0,r12,#configdata ;point to my RMA store
MOV r7,r0 ;save it for later
......@@ -851,13 +851,13 @@ Read_Config
STR r4,[r0] ;end of list
MOV r1,r0 ;pass pointer to terminator back to user
MOV r0,r7 ;let user know location
POP {r2-r10,pc} ;
Pull "r2-r10,pc" ;
;r0 pointer to list -1 terminated
;r1 pointer to terminator
dotableread
PUSH {r1-r10,lr} ;
Push "r1-r10,lr" ;
MOV r4,r0 ;
10 LDRB r0,[r2],#1 ;get pin
CMP r0,#&FF ;last
......@@ -926,12 +926,12 @@ dotableread
B %BT10 ;get next
20
MOV r0,r4 ;pass pointer back
POP {r1-r10,pc} ;
Pull "r1-r10,pc" ;
;---------------------------------------------