Summary Files Commits Branches @commit @diff @stats
path: root / hello_world / kernal.oph.s
blob: 086d3c10c02b333e528507d113f695918f05f22a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
.alias putchar $FFD2

; print [null-terminated string start address]
.macro print
         ldx #0       ; x = 0
 _loop:  lda _1, x    ; while (_1[x] != 0) {
         beq _done
         jsr putchar  ;    putchar(_1[x])
         inx          ;    ++x
         jmp _loop    ; }
 _done:
.macend