home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / Information / 64_128-KERNAL-ROM < prev    next >
Encoding:
Text File  |  2019-04-13  |  18.8 KB  |  261 lines

  1. C64 TO C128 CROSS REFERENCE
  2.  
  3. Compiled by Kevin Hopkins, Monticello, IL
  4.  
  5. Note that this document is 93 columns wide.  To print it out to your printer,
  6. you should place it into either 'Elite' (12 CPI) or 'Condensed' (15-17 CPI)
  7. mode.  Some printers are not capable of this--so a few of the lines may
  8. wrap-around to the next available line.
  9.  
  10.  
  11. *******************************KERNAL ROM CROSS REFERENCE**********************************
  12. C64                                                     C64    C128      C128
  13. ADDR   ROUTINE COMMENTS                                LABEL   LABEL     ADDR     NOTE
  14. *******************************************************************************************
  15. e4b7   Patch room for later kernal versions          ------  ------    ----
  16. e4d3   Patch to ef90 test if RS-232 start bit rec.   ------  ------    e6d8
  17. e4da   Clear color RAM to color in background reg.   ------  ------    c4b7
  18. e4e0   Pause after finding a file on cassette        ------  ------    e907
  19. e4ec   Baud rate table for PAL standard monitors     ------  ------    e864
  20. e500   Return base address of system I/O block       IOBASE  IOBASE    f781
  21. e505   Return screen size - rows in .y cols. in .x   SCREEN  SCRORG    cc58  *  c00f
  22. e50a   Read/Set location of the cursor               PLOT    PLOT      cc6a via c018
  23. e518   Initialize screen and keyboard                ------  CINT      c07b *** c000
  24. e544   Initialize screen line link tbl. & clear scr. ------  CLEAR     c142
  25. e566   Home the cursor                               ------  HOME      c150
  26. e56c   Set pointer to current screen line            ------  SETLINE   c15c
  27. e5a0   Set default I/O devices & VIC default values  ------  ------    e157
  28. e5b4   Get character from keyboard buffer            LP2     KEYIN     c234 via c006
  29. e5ca   Wait for carriage return from keyboard        ------  KEYLIN    c258
  30. e632   Input character from screen or keyboard       ------  GETSCRN   c29b  *  c009
  31. e684   Test for quote marks                          ------  QUOTECK   c2ff
  32. e691   Add a character to the screen                 ------  SETCHAR   c320
  33. e6a8   Return from outputting a character to screen  ------  PRNTEXIT  c30c
  34. e6b6   Update the cursor position                    ------  UDCRSR    c33e
  35. e701   Move cursor back over 40 col. line boundary   ------  RETREAT   cc00
  36. e716   Output to the screen (Main screen editor)     ------  PRINT     c72d via c00c
  37. e87c   Move cursor to next line                      ------  NEXTLIN   c363
  38. e891   Output a carriage return                      ------  RTRN      c76f
  39. e8a1   Move cursor to previous screen line           ------  ------    c86d
  40. e8b3   Move cursor to next screen line               ------  ------    c85d
  41. e8cb   Check for a color change                      ------  COLORSET  c7da
  42. e8da   PETSCII color code equivalent table           ------  COLORTBL  ce4c
  43. e8ea   Scroll screen                                 ------  SCROLL    cea6
  44. e965   Insert a blank line on the screen             ------  OPENLIN   c37c
  45. e9c8   Move screen line                              ------  MOVLINE   c40d  (c41b)
  46. e9e0   Set temporary color pointer for scrolling     ------  ------    c411
  47. e9f0   Set starting addr pointer of current scr line ------  SETADDR   c15e
  48. e9ff   Clear screen line                             ------  CLRLINE   c4a5
  49. ea13   Set cursor blink timing & color mem. addr.    ------  DISPLY    cc34  *  c003
  50. ea1c   Store to screen                               ------  ------    cc3e
  51. ea24   Synchronize color RAM pt. to Screen line pt.  ------  ------    c17c
  52. ea31   IRQ interrupt entry                           ------  IRQ       fa65
  53. ea81   Interrupt exit (C64 see also febc)            ------  CRTI      ff33
  54. ea87   Read the keyboard                             SCNKEY  SCNKEY    c55d  *  c012
  55. eae0   Decode keystroke put ASCII value in keybuff.  ------  REPEAT    c651  *  c015
  56. eb48   Set up proper keyboard decode table           ------  ------    c60a
  57. eb64   Load & evaluate decoder table of shift patrn  ------  ------    c62f
  58. eb79   Keyboard decode table vectors                 ------  KEYPTRS   c06f
  59. eb81   Standard keyboard matrix decode table         ------  ------    fa80
  60. ebc2   Shifted keyboard matrix decode table          ------  ------    fad9
  61. ec03   Commodore logo keyboard matrix decode table   ------  ------    fb32
  62. ec44   Set lowercase/uppercase or uppercase/graphics ------  ------    c880
  63. ec5e   Set flag to enable-disable switching chr set  ------  ------    c8a6
  64. ec78   Control keyboard matrix decode table          ------  ------    fb8b
  65. ecb9   Video chip register default table             ------  ------    e2c7
  66. ece7   Text for keybrd buffer when SHIFT/RUN pressed ------  ------    cee7
  67. ecf0   Low byte table of screen line addresses       ------  SADDRTBL  c033
  68. ed09   Send TALK to a device on the serial buss      TALK    TALK      e33b
  69. ed0c   Send LISTEN to a device on the serial buss    LISTEN  LISTEN    e33e
  70. ed11   Send command code to device on serial buss    ------  ------    e343
  71. ed40   Send a byte on the serial buss                ------  ------    e38c
  72. edad   Set status word                               ------  ------    e425
  73. edb9   Send 2nd addr to dev on ser buss after LISTEN SECOND  SECOND    e4d2
  74. edbe   Set serial ATN line low (inverted to active)  ------  ------    e4d7
  75. edc7   Send 2nd addr to dev on ser buss after TALK   TKSA    TKSA      e4e0
  76. eddd   Send a byte to I/O device over serial buss    CIOUT   CIOUT     e503
  77. edef   Send UNTALK to a device on serial buss        UNTLK   UNTLK     e515
  78. edfe   Send UNLISTEN to a device on serial buss      UNLSN   UNLSN     e526
  79. ee13   Receive data byte from device on serial buss  ACPTR   ACPTR     e43e
  80. ee85   Set serial clock line low (inverted to active)------  ------    e545
  81. ee8e   Set serial clock line high (inverted inactive)------  ------    e54e
  82. ee97   Set serial buss data output line low (invt hi)------  ------    e557
  83. eea0   Set serial buss data output line high (inv lo)------  ------    e560
  84. eea9   Get serial buss data & clock pulse input bits ------  ------    e569
  85. eeb3   Perform an approximate one-millisecond delay  ------  ------    e597  (e385)
  86. eebb   Transmit RS-232 bit (NMI interrupt driven)    ------  ------    e5ff
  87. eed7   Prepare parity bit & set stop bits counter    ------  ------    e61b
  88. ef00   Prepare to send stop bit                      ------  ------    e644
  89. ef06   Prepare to send next byte                     ------  ------    e64a
  90. ef2e   Handle RS-232 errors while transmitting       ------  ------    e672
  91. ef4a   Set word length for current RS-232 character  ------  ------    e68e
  92. ef59   Receive next RS-232 bit (NMI)                 ------  ------    e69d
  93. ef6e   Test for stop bit                             ------  ------    e6b2
  94. ef7e   Setup to receive a new byte from RS-232       ------  ------    e6c2
  95. ef90   Test if start bit received from RS-232        ------  ------    e6d4
  96. ef97   Put a byte of receive data into RS-232 inbuff ------  ------    e6df
  97. efb3   Check parity of received byte                 ------  ------    e6fb
  98. efc7   Handle errors while receiving from RS-232 dev ------  ------    e70f
  99. efdb   Check for framing/break error                 ------  ------    e723
  100. efe1   CHKOUT for the RS-232 device                  ------  ------    e729
  101. f014   Store character in transmit buffer            ------  ------    e75c
  102. f02e   Prepare Timer A/Timer 1 interrupt for RS-232  ------  ------    e776
  103. f04d   CHKIN for the RS-232 device                   ------  ------    e795
  104. f086   Get character from RS-232 receive buffer      ------  ------    e7ce
  105. f0a4   Stop CIA#2 RS-232 NMIs for serial/cassette rt ------  ------    e7ec
  106. f0bd   Kernal control messages                       ------  ------    f6b0
  107. f12b   Print kernal error messages if in direct mode ------  ------    f71e
  108. f13e   Get one byte from the input device            GETIN   GETIN     eeeb
  109. f14e   GETIN from the RS-232 device                  ------  ------    eefd
  110. f157   Input a character from the current device     CHRIN   BASIN     ef06
  111. f179   CHRIN from Tape                               ------  ------    ef28
  112. f199   Return byte from tape buffer                  ------  ------    ef48
  113. f1ad   Get character from serial input channel       ------  ------    ef5c
  114. f1b8   CHRIN from RS-232 device                      ------  ------    ef67
  115. f1ca   Output a byte                                 CHROUT  BSOUT     ef79
  116. f1dc   CHROUT to tape                                ------  ------    ef8b
  117. f208   CHROUT to RS-232 device                       ------  ------    efb7
  118. f20e   Designate a logical file as current input chn CHKIN   CHKIN     f106
  119. f237   Open serial input channel                     ------  ------    f127
  120. f250   Designate a logical file as current output ch CHKOUT  CKOUT     f14c
  121. f279   Open serial output channel                    ------  ------    f16d
  122. f291   Determine device for CLOSE                    CLOSE   CLOSE     f188
  123. f2ab   Close a logical I/O file for RS-232 device    ------  ------    f1a2
  124. f2c8   Close a logical I/O file for tape             ------  ------    f1a9
  125. f2ee   Close a logical I/O file for serial device    ------  ------    f1cf
  126. f2f1   Common exit for close logical file            ------  ------    f1e4
  127. f30f   Find the file in the logical file table       ------  ------    f202
  128. f31f   Set current logical file, device, 2ndary addr ------  ------    f212
  129. f32f   Close all logical I/O files                   CLALL   CLALL     f222
  130. f333   Restore current I & O devices to default devs CLRCHN  CLRCH     f226
  131. f34a   Open a logical I/O file                       OPEN    OPEN      efbd
  132. f49e   Load RAM from a device                        LOAD    LOAD      f265
  133. f5af   Print SEARCHING message if in direct mode     ------  ------    f50f
  134. f5c1   Print filename                                ------  ------    f521
  135. f5d2   Print LOADING or VERIFYING                    ------  ------    f533
  136. f5dd   Save RAM to a device                          SAVE    SAVE      f53e
  137. f68f   Print SAVING & filename if in direct mode     ------  ------    f5bc
  138. f69b   Update software clock & check for STOP key    UDTIM   UDTIM     f5f8
  139. f6dd   Read time from software clock into .A,.X,.Y   RDTIM   RDTIM     f65e
  140. f6e4   Set the software clock from .A,.X,.Y          SETTIM  SETTIM    f665
  141. f6ed   Test STOP key                                 STOP    STOP      f66e
  142. f6fb   Set kernal I/O error message                  ------  ------    f67c
  143. f72c   Get next tape file header from cassette       ------  ------    e8d0
  144. f76a   Write tape file header block                  ------  ------    e919
  145. f7d0   Put pointer to tape buffer in .X & .Y reg.    ------  ------    e980
  146. f7d7   Set I/O area start & end pnts to tape buffer  ------  ------    e987
  147. f7ea   Search tape for filename                      ------  ------    e99a
  148. f80d   Increment count of number of chrs in tape buf ------  ------    e9be
  149. f817   Test cass. butt's & handle mess for tape read ------  ------    e9c8
  150. f82e   Check cassette switch                         ------  ------    e9df
  151. f838   Test cass. but's & handle mess for tape write ------  ------    e9e9
  152. f841   Read tape header into buffer                  ------  ------    e9f2
  153. f84a   Load next two blocks of data from cassette    ------  ------    e9fb
  154. f864   Write tape buffer to tape                     ------  ------    ea15
  155. f875   Common code for read/writing tape data block  ------  ------    ea26
  156. f8d0   Test STOP key during cassette I/O operations  ------  ------    ea8f
  157. f8e2   Adjust CIA#1 Timer A for Tape Bit Timing      ------  ------    eaa1
  158. f92c   Read tape Data (IRQ)                          ------  ------    eaeb
  159. fa60   Receive & store next character from cassette  ------  ------    ec1f
  160. fb8e   Move tape SAVE/LOAD addr. into pointer ($ac)  ------  ------    ed51
  161. fb97   Reset counters for read/writing a new byte    ------  ------    ed5a
  162. fba6   Toggle the tape data output line              ------  ------    ed69
  163. fbc8   Write data to cassette - part 2 (IRQ)         ------  ------    ed8b
  164. fc6a   Write data to cassette - part 1 (IRQ)         ------  ------    ee2e
  165. fc93   Restores the default IRQ routine              ------  ------    ee57
  166. fcb8   Terminate cassette I/O                        ------  ------    ee95
  167. fcbd   Set the IRQ vector for tape operations        ------  ------    ee9b
  168. fcca   Turn off the tape motor                       ------  ------    eeb0
  169. fcd1   Check the tape read/write pointer             ------  ------    eeb7
  170. fcdb   Advance the tape read/write pointer           ------  ------    eec1
  171. fce2   Power-on reset routine                        ------  RESET     e000
  172. fd02   Check for autostart cartridge                 ------  ------    e1f0 and e242
  173. fd10   Text for autostart cartridge check            ------  ------    e2c4
  174. fd15   Restore RAM vectors for default I/O routines  RESTOR  RESTOR    e056
  175. fd1a   Set RAM vector table from table pnt in .X,.Y  VECTOR  VECTOR    e05b
  176. fd30   Table of RAM vectors to default I/O routines  ------  ------    e073
  177. fd50   Perform RAM test & set pntrs to RAM top/bot   RAMTAS  RAMTAS    e093
  178. fd9b   Table of tape IRQ vectors                     ------  ------    eea8
  179. fda3   Initialize CIA I/O devices                    IOINIT  IOINIT    e109
  180. fdf9   Set filename parameters                       SETNAM  SETNAN    f731
  181. fe00   Set logical file num, device num & 2nd addr   SETLFS  SETLFS    f738
  182. fe07   Read the I/O Status Word                      READST  READST    f744
  183. fe18   Set the kernal message control flag           SETMSG  SETMSG    f75c
  184. fe21   Set time-out flag for IEEE bus                SETTMO  SETTMO    f75f
  185. fe25   Read/Set top of RAM pointer                   MEMTOP  MEMTOP    f763
  186. fe34   Read/Set bottom of RAM pointer                MEMBOT  MEMBOT    f772
  187. fe43   NMI interrupt entry point                     ------  NMI       fa40  *  ff05
  188. fe66   BRK routine                                   ------  MONBRK    b009
  189. fe66   Warm start routine                            ------  ------    fa53
  190. fe72   NMI RS-232 handler                            ------  ------    e805
  191. fec2   RS-232 baud rate tables for US TV (NTSC)      ------  ------    e850
  192. fed6   RS-232 receive the next bit (NMI)             ------  ------    e878
  193. ff07   RS-232 byte reception initiator               ------  ------    e8a9
  194. ff48   Main IRQ/BRK interrupt entry point            ------  JIRQ      ff17
  195. ff5b   initialize VICII & set PAL/NTSC flag          CINT    CINT      c07b via c000
  196. ff6e   initialize CIA#1 timer A generated IRQs       ------  ------    e1b8 using rasters
  197. ff80   Kernal version identifier byte                ------  ------    ff80
  198. *******************************************************************************************
  199.  
  200. Jump table for operating system:
  201.  
  202. ff81 to ff5b   jmp to CINT                           ------  JCINT     ff81 to c000 to c07b
  203. ff84 to fda3   jmp to IOINIT                         ------  JIOINIT   ff84 to e109
  204. ff87 to fd50   jmp to RAMTAS                         ------  JRAMTAS   ff87 to e093
  205. ff8a to fd15   jmp to RESTOR                         ------  JRESTOR   ff8a to e056
  206. ff8d to fd1a   jmp to VECTOR                         ------  JVECTOR   ff8d to e05b
  207. ff90 to fe18   jmp to SETMSG                         ------  JSETMSG   ff90 to f75c
  208. ff93 to edb9   jmp to SECOND                         ------  JSECOND   ff93 to e4d2
  209. ff96 to edc7   jmp to TKSA                           ------  JTKSA     ff96 to e4e0
  210. ff99 to fe25   jmp to MEMTOP                         ------  JMEMTOP   ff99 to f763
  211. ff9c to fe34   jmp to MEMBOT                         ------  JMEMBOT   ff9c to f772
  212. ff9f to ea87   jmp to SCNKEY                         ------  JKEY      ff9f to c012 to c55d
  213. ffa2 to fe21   jmp to SETTMO                         ------  JSETTMO   ffa2 to f75f
  214. ffa5 to ee13   jmp to ACPTR                          ------  JACPTR    ffa5 to e43e
  215. ffa8 to eddd   jmp to CIOUT                          ------  JCIOUT    ffa8 to e503
  216. ffab to edef   jmp to UNTLK                          ------  JUNTLK    ffab to e515
  217. ffae to edfe   jmp to UNLSN                          ------  JUNLSN    ffae to e526
  218. ffb1 to ed0c   jmp to LISTEN                         ------  JLISTN    ffb1 to e33e
  219. ffb4 to ed09   jmp to TALK                           ------  JTALK     ffb4 to e33b
  220. ffb7 to fe07   jmp to READST                         ------  JREADST   ffb7 to f744
  221. ffba to fe00   jmp to SETLFS                         ------  JSETLFS   ffba to f738
  222. ffbd to fdf9   jmp to SETNAM                         ------  JSETNAM   ffbd to f731
  223. ffc0 to f34a   jmp thru (IOPEN) at (031a) to OPEN    ------  JOPEN     ffc0 to efbd
  224. ffc3 to f291   jmp thru (ICLOSE) at (031c) to CLOSE  ------  JCLOSE    ffc3 to f188
  225. ffc6 to f20e   jmp thru (ICHKIN) at (031e) to CHKIN  ------  JCHKIN    ffc6 to f106
  226. ffc9 to f250   jmp thru (ICKOUT) at (0320) to CHKOUT ------  JCKOUT    ffc9 to f14c
  227. ffcc to f333   jmp thru (ICLRCH) at (0322) to CLRCHN ------  JCLRCH    ffcc to f226
  228. ffcf to f157   jmp thru (IBASIN) at (0324) to CHRIN  ------  JBASIN    ffcf to ef06
  229. ffd2 to f1ca   jmp thru (IBSOUT) at (0326) to CHROUT ------  JBSOUT    ffd2 to ef79
  230. ffd5 to f49e   jmp to LOAD                           ------  JLOAD     ffd5 to f265
  231. ffd8 to f5dd   jmp to SAVE                           ------  JSAVE     ffd8 to f53e
  232. ffdb to f6e4   jmp to SETTIM                         ------  JSETTIM   ffdb to f665
  233. ffde to f6dd   jmp to RDTIM                          ------  JRDTIM    ffde to f65e
  234. ffe1 to f6ed   jmp thru (ISTOP) at (0328) to STOP    ------  JSTOP     ffe1 to f66e
  235. ffe4 to f13e   jmp thru (IGETIN) at (032a) to GETIN  ------  JGETIN    ffe4 to eeeb
  236. ffe7 to f32f   jmp thru (ICLALL) at (032c) to CLALL  ------  JCLALL    ffe7 to f222
  237. ffea to f69b   jmp to UDTIM                          ------  JUDTIM    ffea to f5f8
  238. ffed to e505   jmp to SCREEN                         ------  JSCRORG   ffed to c00f to cc5b
  239. fff0 to e50a   jmp to PLOT                           ------  JPLOT     fff0 to c018 to cc6a
  240. fff3 to e500   jmp to IOBASE                         ------  JIOBASE   fff3 to f781
  241. *******************************************************************************************
  242.  
  243. Hardware vectors:
  244.  
  245. fffa to fe43   Non-maskable interrupt vector         ------  NMI       fffa to ff05
  246. fffc to fce2   System reset hardware vector          ------  RESET     fffc to ff3d
  247. fffe to ff48   Maskable interrupt request & BRK      ------  IRQ/BRK   fffe to ff17
  248.  
  249. *******************************************************************************************
  250.  
  251. Bibliography:
  252.  
  253. Mapping the Commodore 64; by Sheldon Leemon (Compute! Books)
  254. Mapping the Commodore 128; by Ottis R. Cowper (Compute! Books)
  255. Compute!'s VIC-20 and Commodore 64 TOOL KIT: BASIC; by Dan Heeb (Compute! Books)
  256. Compute!'s VIC-20 and Commodore 64 TOOL KIT: KERNAL; by Dan Heeb (Compute! Books)
  257. The Anatomy of Commodore 64; by Angerhausen, Becker, Englisch and Gerits (Abacus)
  258. Commodore 128 BASIC 7.0 Internals; by Jarvis and Springer (Abacus)
  259. Commodore 128 Internals; by Gerits, Schrieb and Thrun (Abacus)
  260.  
  261.