Guest User

Untitled

a guest
Jan 14th, 2020
930
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; 64TASS
  2. ; hello.asm
  3.  
  4. KERNAL_CLEAR_SCREEN = $e544 ; KERNAL ROM routine.
  5. VICSCN = $0400              ; VIC-II Screen Video Matrix, 1024 (int).
  6.  
  7.  
  8. ; BASIC loader.
  9. *=$0801             ; The two byte load address at the start of the .PRG file.
  10.     .byte $0b, $08  ; Linked list pointer to next line of BASIC.
  11.     .byte $d9, $07  ; 2009 (int) line number (LO, HI).
  12.     .byte $9e       ; BASIC SYS token.
  13.     .text "2064"    ; Memory address (int) to start of ASM: $0810
  14.  
  15.  
  16. ; ASM code.
  17. *=$0810 ; The start of ASM execution.
  18.  
  19.       jsr KERNAL_CLEAR_SCREEN
  20.  
  21.       ; Enter HELLO WORLD into screen memory ($0400-$07e7) (1024-2023).
  22.       lda #8         ; 'H' Screen Code
  23.       sta VICSCN + 0 ; 'H' in $0400 screen memory
  24.            
  25.       lda #5         ; 'E' Screen Code
  26.       sta VICSCN + 1 ; 'E' in $0400+1 screen memory
  27.  
  28.       lda #12         ; 'L' Screen Code
  29.       sta VICSCN + 2 ; 'L' in $0400+2 screen memory
  30.      
  31.       lda #12         ; 'L' Screen Code
  32.       sta VICSCN + 3 ; 'L' in $0400+3 screen memory
  33.  
  34.       lda #15         ; 'O' Screen Code
  35.       sta VICSCN + 4 ; 'O' in $0400+4 screen memory
  36.  
  37.       lda #32        ; ' ' Screen Code
  38.       sta VICSCN + 5 ; ' ' in $0400+5 screen memory
  39.  
  40.       lda #23         ; 'W' Screen Code
  41.       sta VICSCN + 6 ; 'W' in $0400+6 screen memory
  42.      
  43.       lda #15         ; 'O' Screen Code
  44.       sta VICSCN + 7 ; 'O' in $0400+7 screen memory
  45.      
  46.       lda #18         ; 'R' Screen Code
  47.       sta VICSCN + 8 ; 'R' in $0400+8 screen memory
  48.      
  49.       lda #12         ; 'L' Screen Code
  50.       sta VICSCN + 9 ; 'L' in $0400+9 screen memory
  51.      
  52.       lda #4         ; 'D' Screen Code
  53.       sta VICSCN + 10; 'D' in $0400+10 screen memory
  54.      
  55.       rts            ; All programs must end with Return To Subroutine (RTS).
RAW Paste Data