Advertisement
Guest User

Untitled

a guest
Aug 28th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     ;A and X are 0 on entry
  2.     dex; ldx #$ff
  3.     txs
  4.     ldx #35
  5. l2    
  6.     lda code,x
  7.     pha;  sta $100,x
  8.     stz $fda0,x ;NEW does not fully fit
  9.     dex
  10.     bpl l2
  11.     rts
  12.     ;jmp code_start
  13.     ;bmi code_start does not work, no idea why
  14. code
  15. *=$1dc
  16.     .byte <(code_start-1) ;to launch with RTS ;-)
  17.     .byte >(code_start-1)
  18. code_start
  19.  
  20.     lda  cart0 // get number of full blocks to load
  21.     sta blocks2load
  22.     stz block
  23. load_a_full_block:
  24.    inc block
  25.    lda block
  26.    jsr $fe00
  27.    tay // a == 0 after fe00, x == 2
  28. pageloop
  29.     lda cart0
  30. target
  31.     sta $200,y
  32.     iny
  33.     bne pageloop
  34.     inc target+2
  35.     dex
  36.     bne pageloop
  37.     dec blocks2load
  38.     bne load_a_full_block
  39. ready  
  40. ;this is at *=$200 now
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement