From: Thorsten O. <ad...@th...> - 2025-01-15 14:23:38
|
Other funny thing i just realized: the original version of the alcyon assembler was not able to assemble short absolute addressing modes, which saves 2 bytes when acessing system variables or I/O addresses. In TOS 2.x and above they used mas instead, but in older versions this was worked around by setting a5 to 0 and use that as a base register. However in TOS 1.00, they missed a lot of places where this mode could be used, sometimes even inside one instruction: vsetscreen: [00fc0982] 4aaf 0004 tst.l 4(a7) [00fc0986] 6b06 bmi.s $00FC098E [00fc0988] 2b6f 0004 044e move.l 4(a7),1102(a5) [00fc098e] 4aaf 0008 tst.l 8(a7) [00fc0992] 6b10 bmi.s $00FC09A4 [00fc0994] 13ef 0009 ffff 8201 move.b 9(a7),$FFFF8201 [00fc099c] 13ef 000a ffff 8203 move.b 10(a7),$FFFF8203 [00fc09a4] 4a6f 000c tst.w 12(a7) [00fc09a8] 6b24 bmi.s $00FC09CE [00fc09aa] 1b6f 000d 044c move.b 13(a7),1100(a5) [00fc09b0] 6100 fd74 bsr $00FC0726 [00fc09b4] 13ed 044c ffff 8260 move.b 1100(a5),$FFFF8260 <--- [00fc09bc] 426d 0452 clr.w 1106(a5) [00fc09c0] 4eb9 00fc a7e2 jsr esc_init [00fc09c6] 33fc 0001 0000 0452 move.w #$0001,$00000452 [00fc09ce] 4e75 rts |