8-Bit Software

The BBC and Master Computer Public Domain Library

Back to 8BS Or Back to Disassembly


Page Last Altered:

9C4B Display Current Line Number on screen [for TRACE]

Submitted by Steve Fewell

Entry criteria: The IWA contains the current line number.

Description:

This routine is called if TRACE is on.
Check whether the Line number in the IWA (&2A-&2B) is greater than the maximum TRACE line (&21-&22), if it is
then exit.

Otherwise output the '[' (open square bracket) character, which is the Start of TRACE Line Number identifier character.
call routine &A081 to output the Line Number (in the IWA) to the screen.
Output the ']' (close square bracket) character, which is the End of TRACE Line Number identifier character.

Call routine &BD92 to output a space character and exit.


Disassembly for the Display Current Line Number on screen [TRACE] routine

9C4B * 165 042 A5 2A LDA &2A
9C4D ! 197 033 C5 21 CMP &21
9C4F + 165 043 A5 2B LDA &2B
9C51 " 229 034 E5 22 SBC &22
9C53   176 172 B0 AC BCS -84 --> &9C01   [RTS]
9C55 [ 169 091 A9 5B LDA#&5B
9C57   032 152 189 20 98 BD JSR &BD98 Output character in A
9C5A   032 129 160 20 81 A0 JSR &A081 Print Line Number on screen
9C5D ] 169 093 A9 5D LDA#&5D
9C5F   032 152 189 20 98 BD JSR &BD98 Output character in A
9C62 L 076 146 189 4C 92 BD JMP &BD92 Output a space character

 


 Back to 8BS
Or