<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Wed, 27 Feb 2008 01:28:31 +1100
From   : msmcdoug@... (Mark McDougall)
Subject: BBC FPGA Boots to BASIC... almost...

Jonathan Graham Harston wrote:

> You could temporarily replace the VDU code with something like:
>  
> PHA:TAY:PHA:TXA:PHA
> TSX:LDA &103,A
> CMP #32:BCS P%+4:LDA #42
> LDY #0:STA (&D8),Y
> INC &D8:BNE P%+4:INC &D9
> PLA:TAX:PLA:TAY:PLA:RTS

I'm having trouble following your code...

1st of all, I believe the 1st TAY should be TYA?

2nd, IIUC, on entry A contains the character to be printed. I'm not sure 
exactly what the "LDA &103,A" instruction is, and how it restores the 
character???

If I run the code as I interpreted it (LDA &103 - absolute), I do get 
something recognisable, but with lots of '*' and error messages are printed 
like '*istake'...

FWIW I've never written a program in 6502...

Regards,

-- 
|              Mark McDougall                | "Electrical Engineers do it
|  <http://members.iinet.net.au/~msmcdoug>   |   with less resistance!"
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>