sbasm3
sbasm3 copied to clipboard
Address calculations in SC/MP still not working on page wrap
I was pleased to see that you have made changes to the relative addressing on the SC/MP module, and I have been trying to re-assemble the MK14 SCIOS ROM from source. I installed SBASM from sbasm-master.zip downloaded from here and the scios assembled without errors. However,there seems to be a problem on negative offsets calculated from P3:
0052- 115 ; Tape Interface Routines.
0052- 116 ; ****************************************************************************
00D5- 117 Count .EQ 0D5h
00D6- 118 Len .EQ 0D6h
0052- 119 ; ****************************************************************************
0052- 120 ; Store to Tape. P1^Data,@Count is the bytes
0052- 121 ; ****************************************************************************
0052-C5 01 122 ( 18) ToTape: ld @1(1) ; E := (P1), increment P1
0054-01 123 ( 7) xae
0055-C4 01 124 ( 10) ldi 1 ; A := 1 (the bit pattern)
0057-CB 00 125 ( 18) Next1: st Count(3) ; Save in Count (P3)
0059-C4 01 126 ( 10) ldi 1 ; set F0 to 1
005B-07 127 ( 6) cas
005C-8F 08 128 ( 13+) dly 8 ; Delay 8 Cycles
005E-C3 00 129 ( 18) ld Count(3) ; A = Count & E
0060-50 130 ( 6) ane ; test if bit is set...
0061-98 07 131 (9/11) jz Zero
0063-8F 18 132 ( 13+) dly 018h ; (bit is 1) Delay $18 cycles
0065-C4 00 133 ( 10) ldi 0 ; set F0 to 0 again
0067-07 134 ( 6) cas
0068-90 05 135 ( 11) jmp CDone
006A-C4 00 136 ( 10) Zero: ldi 0 ; bit is zero (set F0 to 0)
006C-07 137 ( 6) cas
006D-8F 18 138 ( 13+) dly 018h ; Delay $18 Cycles
The instruction "sta Count(3)" should generate CB D5 whereas it is generating CB 00. I compared the output with a listing someone had done with TASM and verified that this was the case. For your conveience I have attached the source for SCIOS in case it is useful. scios.zip
Hi Ian,
This week I got some help from the UK Vintage Radio Repair and Restoration forum on this topic. They have made a fix to the assembler, which they have been using for over a year now. And their claim is that with this fix everything is working as it should be. I don't have the experience to double check on that claim, so I'll have to take their word for it. The fix was very small, so it was not too difficult to review it.
You can download the fixed version from my website or from github now, in case you're still interested.
On Fri, 16 Jul 2021 at 21:55, Ian @.***> wrote:
I was pleased to see that you have made changes to the relative addressing on the SC/MP module, and I have been trying to re-assemble the MK14 SCIOS ROM from source. I installed SBASM from sbasm-master.zip downloaded from here and the scios assembled without errors. However,there seems to be a problem on negative offsets calculated from P3:
0052- 115 ; Tape Interface Routines. 0052- 116 ; **************************************************************************** 00D5- 117 Count .EQ 0D5h 00D6- 118 Len .EQ 0D6h 0052- 119 ; **************************************************************************** 0052- 120 ; Store to Tape. @.*** is the bytes 0052- 121 ; **************************************************************************** 0052-C5 01 122 ( 18) ToTape: ld @1(1) ; E := (P1), increment P1 0054-01 123 ( 7) xae 0055-C4 01 124 ( 10) ldi 1 ; A := 1 (the bit pattern) 0057-CB 00 125 ( 18) Next1: st Count(3) ; Save in Count (P3) 0059-C4 01 126 ( 10) ldi 1 ; set F0 to 1 005B-07 127 ( 6) cas 005C-8F 08 128 ( 13+) dly 8 ; Delay 8 Cycles 005E-C3 00 129 ( 18) ld Count(3) ; A = Count & E 0060-50 130 ( 6) ane ; test if bit is set... 0061-98 07 131 (9/11) jz Zero 0063-8F 18 132 ( 13+) dly 018h ; (bit is 1) Delay $18 cycles 0065-C4 00 133 ( 10) ldi 0 ; set F0 to 0 again 0067-07 134 ( 6) cas 0068-90 05 135 ( 11) jmp CDone 006A-C4 00 136 ( 10) Zero: ldi 0 ; bit is zero (set F0 to 0) 006C-07 137 ( 6) cas 006D-8F 18 138 ( 13+) dly 018h ; Delay $18 Cycles
The instruction "sta Count(3)" should generate CB D5 whereas it is generating CB 00. I compared the output with a listing someone had done with TASM and verified that this was the case. For your conveience I have attached the source for SCIOS in case it is useful. scios.zip https://github.com/sbprojects/sbasm3/files/6833077/scios.zip
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sbprojects/sbasm3/issues/7, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHRIN2MEFCZKVL3MCX7H3TYCFDTANCNFSM5AQFN3QQ .
-- Met vriendelijke groet, Kind regards,
San Bergmans