Changes

Jump to: navigation, search

6502 Emulator Example Code

568 bytes added, 10:12, 3 February 2020
Place a Message on the Character Display
== Place a Message on the Character Display ==
 
=== Without using the ROM routines ===
define SCREEN $f000
text:
dcb "6","5","0","2",32,"w","a","s",32,"h","e","r","e",".",00
 
=== Using the ROM routines ===
 
; ROM routines
define SCINIT $ff81 ; initialize/clear screen
define CHRIN $ffcf ; input character from keyboard
define CHROUT $ffd2 ; output character to screen
define SCREEN $ffed ; get screen size
define PLOT $fff0 ; get/set cursor coordinates
jsr SCINIT
ldy #$00
char: lda text,y
beq done
jsr CHROUT
iny
bne char
done: brk
text:
dcb "6","5","0","2",32,"w","a","s",32,"h","e","r","e",".",00
== Type on the Screen ==

Navigation menu