Guest User

Untitled

a guest
Oct 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. putchar_ptr = $346
  2. csrhinh = 752
  3. character = $80
  4. rowcrs = $54
  5. colcrs = $55
  6. org $2000
  7.  
  8. .proc main
  9. mva #1 csrhinh
  10. mva #6 rowcrs
  11. mva #16 colcrs
  12. mva #0 character
  13.  
  14. next_character
  15. ldx character
  16. cpx #.len text
  17. beq stop
  18. lda text,x
  19. jsr putchar
  20. inc character
  21. jmp next_character
  22.  
  23. stop jmp stop
  24.  
  25. .proc putchar
  26. tax
  27. lda putchar_ptr+$1
  28. pha
  29. lda putchar_ptr
  30. pha
  31. txa
  32. rts
  33. .endp
  34.  
  35. .local text
  36. .byte 'Hi there!',$9b,'new line'
  37. .endl
  38.  
  39. .endp
  40.  
  41. run main
  42.  
  43. LDA ptr+1 * high byte of target routine pointer
  44. PHA * push down the stack
  45. LDA ptr * high byte of target routine pointer
  46. PHA * push down the stack
  47. rts * 'returning' to the address at TOS
Add Comment
Please, Sign In to add comment