| 1 |
;ACME 0.95 |
| 2 |
|
| 3 |
!ifdef lib_cbm_kernal_a !eof |
| 4 |
lib_cbm_kernal_a = 1 |
| 5 |
|
| 6 |
; Taken from the web. |
| 7 |
; Sorry, I can't give credit because I don't have the URL anymore. |
| 8 |
; There are alternative names for some calls. |
| 9 |
|
| 10 |
!address { |
| 11 |
; for additional c128 calls, see <cbm/c128/kernal.a> |
| 12 |
k_cint = $ff81 |
| 13 |
k_ioinit = $ff84 |
| 14 |
; cbm-ii rom starts here: |
| 15 |
k_ramtas = $ff87 |
| 16 |
k_restor = $ff8a |
| 17 |
k_vector = $ff8d |
| 18 |
k_setmsg = $ff90 |
| 19 |
k_secnd = $ff93 |
| 20 |
k_tksa = $ff96 |
| 21 |
k_memtop = $ff99 |
| 22 |
k_membot = $ff9c |
| 23 |
k_key = $ff9f |
| 24 |
k_settmo = $ffa2 |
| 25 |
k_iecin = $ffa5:k_acptr = $ffa5 |
| 26 |
k_iecout = $ffa8:k_ciout = $ffa8 |
| 27 |
k_untalk = $ffab:k_untlk = $ffab |
| 28 |
k_unlisten = $ffae:k_unlsn = $ffae |
| 29 |
k_listen = $ffb1:k_listn = $ffb1 |
| 30 |
k_talk = $ffb4 |
| 31 |
k_readss = $ffb7 |
| 32 |
k_setlfs = $ffba ; set file parameters (A = logical file number, X = device, Y = secondary address) |
| 33 |
k_setnam = $ffbd ; set file name (A = length, YYXX = pointer) |
| 34 |
; pet rom starts here: |
| 35 |
; i/o calls: these may set C on error. in that case, A holds error code, see <cbm/ioerror.a> for the actual values. |
| 36 |
k_open = $ffc0 ; open channel/file (call setlfs/setnam before!) |
| 37 |
k_close = $ffc3:k_close_A = $ffc3 ; close channel/file (A = logical file number) |
| 38 |
k_chkin = $ffc6:k_chkin_X = $ffc6 ; set input channel (X = logical file number) |
| 39 |
k_chkout = $ffc9:k_chkout_X = $ffc9:k_ckout = $ffc9 ; set output channel (X = logical file number) |
| 40 |
k_clrchn = $ffcc:k_clrch = $ffcc ; restore default input/output channels |
| 41 |
k_chrin = $ffcf:k_basin = $ffcf ; read byte from current input channel (not the same as $ffe4, see note* below) |
| 42 |
; A is result byte |
| 43 |
; X is preserved |
| 44 |
; Y gets clobbered by tape access (preserved by disk access) |
| 45 |
k_chrout = $ffd2:k_basout = $ffd2:k_bsout = $ffd2 ; send byte to current output channel |
| 46 |
; A/X/Y are preserved |
| 47 |
k_load = $ffd5:k_load_AXY = $ffd5 ; load file to memory, or verify (call setlfs/setnam before!) |
| 48 |
; A: zero means LOAD, nonzero means VERIFY |
| 49 |
; YYXX is desired load address (only used if secondary address == 0), returns end address plus 1 |
| 50 |
k_save = $ffd8:k_save_AXY = $ffd8 ; save memory to file (call setlfs/setnam before!) |
| 51 |
; A is zp address of start ptr(!) |
| 52 |
; YYXX is end address plus 1 |
| 53 |
k_settim = $ffdb ; set time |
| 54 |
k_rdtim = $ffde ; read time |
| 55 |
k_stop = $ffe1 ; check STOP key |
| 56 |
k_getin = $ffe4:k_get = $ffe4 ; get input byte (not the same as $ffcf, see note* below) |
| 57 |
; A is result byte |
| 58 |
; X gets clobbered by keyboard access (preserved by disk access) |
| 59 |
; Y gets clobbered by keyboard/tape access (preserved by disk access) |
| 60 |
k_clall = $ffe7 |
| 61 |
k_udtim = $ffea |
| 62 |
; pet rom stops here!? |
| 63 |
k_scrorg = $ffed ; returns screen size (X = number of columns, Y = number of lines) |
| 64 |
; CAUTION: the c128 uses a new format: |
| 65 |
; c128: X/Y now return maximum values in current window (so 0..39/0..24 instead of 40/25). |
| 66 |
; c128: A returns max column on current screen (39 or 79) |
| 67 |
k_plot = $fff0:k_plot_CXY = $fff0 ; get/set cursor (X is line, Y is column) |
| 68 |
; C = 0: set cursor position. |
| 69 |
; C = 1: read cursor position. |
| 70 |
k_iobase = $fff3 ; returns first i/o address (i.e. memory limit) in YYXX |
| 71 |
; cbm-ii: $dc00 |
| 72 |
; vic20: $9110 |
| 73 |
; c64: $d000 |
| 74 |
; 264: $fd00 |
| 75 |
; c128: $d000 |
| 76 |
} |
| 77 |
|
| 78 |
;note* |
| 79 |
; the difference between CHRIN and GETIN depends on the current input device: |
| 80 |
; input device 0 (keyboard): CHRIN reads from screen, GETIN reads from keyboard buffer |
| 81 |
; (the same difference as between INPUT and GET in basic) |
| 82 |
; input device 2 (rs232): CHRIN does some error handling, GETIN may just return zero on error. |
| 83 |
; roughly speaking, CHRIN returns a "processed" byte while GETIN returns a "raw" byte. |
| 84 |
; for devices on the IEC bus there should be no difference between the two calls. |
| 85 |
; when reading from the console (keyboard/screen), a zero byte means "no data". |
| 86 |
; do not expect a valid Z flag in this case! some devices may clobber the Z flag. |