ô > TestARM/src ô Some convoluted problems *ô SprowCoPro needs CodeStart=&4C,Entry (1ô Other ARMs needs CodeStart=branch or offset 2%ô ARMDev doesn't have OS_Convert* <: Fload%=&8000:Þ mcode% &400 PPC=15:LINK=14:SP=13 Zã P=0 ¸ 1:opt%=P*3+4 dP%=load%:O%=mcode% n [OPT opt% x\ CODE HEADER ‚\ ----------- Œ.CODESTART –%\ Problem in the very first byte!  4\ SprowCoPro needs this to be &4C,EQUW Entry,&xx ª9\ Most other systems need B Entry or EQUD Entry-Start ´&\ RISC OS needs this to be B Entry ¾8\ B Entry will work on all systems except SprowCoPro È\ ÒD.L0000:B Entry:\EQUD Entry-L0000:\EQUD Entry:\EQUD Entry*256+&4C Ü.L0004:EQUW &00 æ.L0006:EQUB &6D ð.L0007:EQUB CopyR-L0000 ú+.Title:EQUB &00:EQUS "ARM Test Program" - EQUB &00:EQUS "0.01 (01 Jan 2017)" 0.CopyR:EQUB &00:EQUS "(C)J.G.Harston":EQUB 0  EQUD load% " EQUD CodeEnd-L0000 , ALIGN 6 .Entry @=STR R0,TempR0:STR R1,TempR1:STR R2,TempR2:STR R13,TempR13 JADR R0,Title+1 TSWI "OS_Write0" ^SWI "OS_NewLine" h: rSWI "OS_GetEnv" |EMOV SP,R1 :\ SP=MEMTOP, before this point we have no stack †STMFD (SP)!,{R0} : š'LDR R0,TempR13:STMFD (SP)!,{R14,R0} ¤-LDR R0,TempR0:LDR R1,TempR1:LDR R2,TempR2 ®STMFD (SP)!,{R0-R12} ¸:  MOV R3,#0 Ì.Registers ÖSWI 256+—"R" à„R R0,R3,#—"0" êCMP R3,#10 ôSUBHS R0,R0,#10 þSWIHS 256+—"1" SWI "OS_WriteC" SWILO 256+—" " SWI 256+—"=" &SWI 256+—"&" 0LDMFD (SP)!,{R0} :BL PrAddress DSWI "OS_NewLine" NADD R3,R3,#1 XCMP R3,#15 bBLO Registers l: vBSWI "OS_WriteS":EQUS "OS_GetEnv:":EQUB 10:EQUB 13:EQUB 0:ALIGN €: Š0SWI "OS_WriteS":EQUS "MEMBOT=&":EQUB 0:ALIGN ”MOV R0,#&83:SWI "OS_Byte" ž#„R R0,R1,R2,LSL #8:BL PrAddress ¨: ²2SWI "OS_WriteS":EQUS " MEMTOP=&":EQUB 0:ALIGN ¼ADD R0,SP,#4:BL PrAddress Æ: Ð=SWI "OS_WriteS":EQUB 10:EQUB 13:EQUS "CMD=>":EQUB 0:ALIGN Ú(LDMFD (SP)!,{R3} :\ R3=>command line ä.CommandLine îLDRB R0,[R3],#1 øCMP R0,#—" " SWIHS "OS_WriteC"  BHS CommandLine 9SWI "OS_WriteS":EQUS "<":EQUB 10:EQUB 13:EQUB 0:ALIGN  : *SWI "OS_Exit" 4: >&\ Manually print 32-bit word in R0 H.PrAddress R+MOV R1,R0 :\ R1=number being processed \%MOV R2,#8 :\ R2=number of digits f.PrAddressLoop pMOV R0,R1,LSR #28 zMOV R1,R1,LSL #4 „CMP R0,#10 ŽADDHS R0,R0,#7 ˜ADD R0,R0,#48 ¢SWI "OS_WriteC" ¬SUBS R2,R2,#1 ¶BNE PrAddressLoop ÀMOV PC,R14 Ê: Ô .Buffer Þ.TempR0:EQUD 0 è.TempR1:EQUD 0 ò.TempR2:EQUD 0 ü.TempR13:EQUD 0 :  .CodeEnd ]í $ñ "Saving"; .?ÿ "SAVE TestARM "+Ã~mcode%+" "+Ã~O%+" "+Ã~load%+" "+Ã~load% 8ñ ÿ