Advertisement
Guest User

Hex War Onefile Loader

a guest
Mar 16th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         .word   $0801
  2.         *=$0801
  3.         relocstart=$4000
  4.         relocend=relocstart+(prgend-prgbgn)
  5.         pages=(prgend-prgbgn+255)/256
  6.  
  7.         .word   basend, 10
  8.         .byt    $9e, " 2062", 0
  9. basend  .word   0
  10.  
  11.         lda     #<prgbgn
  12.         sta     $fb
  13.         lda     #>prgbgn
  14.         sta     $fc
  15.         lda     #<relocstart
  16.         sta     $fd
  17.         lda     #>relocstart
  18.         sta     $fe
  19.         ldx     #pages
  20.         ldy     #$00
  21. lp      lda     ($fb),y
  22.         sta     ($fd),y
  23.         iny
  24.         bne     lp
  25.         inc     $fc
  26.         inc     $fe
  27.         dex
  28.         bne     lp
  29.         lda     #>relocstart
  30.         sta     44
  31.         lda     #<relocend
  32.         sta     45
  33.         sta     47
  34.         sta     49
  35.         lda     #>relocend
  36.         sta     46
  37.         sta     48
  38.         sta     50
  39.         sei
  40.         lda     #4
  41.         sta     198
  42.         lda     #82
  43.         sta     631
  44.         lda     #85
  45.         sta     632
  46.         lda     #78
  47.         sta     633
  48.         lda     #13
  49.         sta     634
  50.         cli
  51.         jmp     ($a002)
  52.  
  53. prgbgn  .byt    0
  54.         .bin    2,0,"hexwarmain.bin"
  55. prgend
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement