Hello world/Line printer: Difference between revisions
Content added Content deleted
Line 284: | Line 284: | ||
\ memory mapped I/O addresses for the printer port |
\ memory mapped I/O addresses for the printer port |
||
HEX |
HEX |
||
B02E |
B02E constant scsr \ serial control status register |
||
B02F |
B02F constant scdr \ serial control data register |
||
DECIMAL |
DECIMAL |
||
: printer-emit ( char -- ) \ output 'char' to the printer serial port |
: printer-emit ( char -- ) \ output 'char' to the printer serial port |
||
begin scsr C@ 80 and until \ loop until the port shows a ready bit |
|||
scdr C! \ C! (char store) writes a byte to an address |
|||
20 ms ; \ delay to prevent over-runs |
20 ms ; \ delay to prevent over-runs |
||