Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; "Hello World" in dasm assembler format.
- processor 6502
- ddata equ $11a0 ; Display data address.
- dcommand equ $11a1 ; Display command address.
- org $1200 ; Code start.
- ldx #0 ; Starting index 0 in X register.
- printnext:
- lda text,x ; Get character from string.
- beq done ; If we read a 0 we're done.
- sta ddata ; Output character.
- lda #$7
- sta dcommand
- inx ; Increment index to next character.
- bne printnext ; Repeat if index doesn't overflow to 0.
- done:
- brk ; Just die.
- text:
- dc.b "Hello, world!", $00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement