Summary Files Commits Branches @commit @diff @stats
path: root / hello_world / kernal.oph.s
blob: 79464a9269fe85a74c540ce607c35069bf763583 (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
         bne _loop    ;    if (x == 0) break }  This allows max 255 character to be read
 _done:
.macend