diff options
author | B. Watson <urchlay@slackware.uk> | 2025-04-22 03:43:03 -0400 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2025-04-22 03:43:03 -0400 |
commit | 22e209f12b3427d0a89b3e33f2471b426ec46f3d (patch) | |
tree | e298c101875f36ef27d5370e5e03da820ef2bc69 /hello.s | |
download | atari8-self-relocator-22e209f12b3427d0a89b3e33f2471b426ec46f3d.tar.gz |
initial commit
Diffstat (limited to 'hello.s')
-rw-r--r-- | hello.s | 75 |
1 files changed, 75 insertions, 0 deletions
@@ -0,0 +1,75 @@ + + .export _main + .include "atari.inc" + + sptr = FR0 + scount = FR0+2 + + .ifndef start_addr + start_addr = $4000 + .endif + + .ifndef RAW + .org start_addr - 6 + .word $ffff + .word start_addr + .word end_addr - 1 + .endif + + .org start_addr +_main: + ldx #0 + stx COLCRS + inx + stx CRSINH + lda #<str1 + ldx #>str1 + jsr printstr + lda #' ' + jsr printa + lda #<str2 + ldx #>str2 + jsr printstr + lda #'.' + jsr printa +cycle: + lda RTCLOK+2 + and #$f0 + ora #$06 + sta COLOR2 + jmp cycle + +printstr: + sta sptr + stx sptr+1 + lda #0 + sta scount +strloop: + ldy scount + lda (sptr),y + bne printchr + rts +printchr: + jsr printa + inc scount + bne strloop + rts + +printa: + tax + lda ICPTH ; the print-one-byte vector for IOCB 0. + pha + lda ICPTL ; low byte of vector + pha + txa + rts + +str1: .byte "Hello",0 +str2: .byte "World",0 + + .ifndef RAW +end_addr: + .word INITAD + .word INITAD+1 + .word _main + .endif |