home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_20_1987_Transactor_Publishing.d64 / memlane3 (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  714b  |  27 lines

  1. 100 ;.y is saved in 'holdy'
  2. 110 ; and loaded with the low byte of the Kernal routine
  3. 120 ; prior to calling 'farkernal'
  4. 130 ;
  5. 140 farkernal =*
  6. 150 sty kernrtn    ;self mod jsr
  7. 160 ldy #0
  8. 170 sty $ff00      ;bank 15
  9. 180 sty $d507      ;your own z page, mr. kernal sir.
  10. 190 ldy holdy      ;in case it's needed
  11. 200 jsr $ffff      ;call routine
  12. 210 kernrtn =*-2
  13. 220 php            ;save status
  14. 230 pha            ;and .a
  15. 240 lda #myzpg     ;my zero page back
  16. 250 sta $d507
  17. 260 sta $ff02      ;latch to bank 1
  18. 270 pla            ;remember .a
  19. 280 plp            ;and status
  20. 290 rts
  21. 300 ;
  22. 310 ;" [200]ere is how [198][193][210][203][197][210][206][193][204] would be used to [208][210][201][206][212] from [194]ank 1:
  23. 320 [153] [178][172]
  24. 330 sty holdy        ;[148] .y
  25. 340 ldy #$d2         ;[179]$ffd2
  26. 350 jmp farkernal
  27.