Oldbitcollector

Loading External Character Sets

Feb 4th, 2022 (edited)
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Loading external character sets into Assembly.
  2. ;Character Sets exported as raw binary from Charpad
  3.  
  4. * = $3800
  5. chars
  6. !bin "./chars/charset.bin",512
  7.    
  8.    
  9. ;Boot loader
  10. !source "./libs/loader.asm"
  11. +start_at $1000
  12.  
  13.  
  14. ;*** Define some useful calls in English
  15. setcursor   = $e50c
  16. print       = $ab1e
  17. printchar   = $ffd2
  18.    
  19.     ;Switch charset pointer to here
  20.     ;$3000 is set by last 3 buts to %110
  21.     ;12288 - 14335
  22.     lda #%00011110
  23.     sta $d018  
  24.    
  25.  
  26. ; **** Set up the initial screen  **** 
  27.    
  28.     lda #147        ; Clear Screen
  29.     jsr printchar
  30.    
  31.     lda #$00        ; Change Screen/Border Colors
  32.     sta $d020
  33.     sta $d021
  34.    
  35.     ldx #1          ; Select row
  36.     ldy #25         ; Select column
  37.     jsr setcursor   ; Set cursor
  38.  
  39.     lda #<prginfo   ; Load lo-byte of string adress
  40.     ldy #>prginfo   ; Load hi-byte of string adress
  41.     jsr print       ; Print Program Info   
  42.     rts
  43.    
  44.    
  45. prginfo
  46. !byte $05
  47. !text "FONT TEST"
  48. !byte $0d
  49. !byte $99
  50. !text "                         "
  51. !text "BY JEFF LEDGER"
  52.  
  53. !byte $00
Add Comment
Please, Sign In to add comment