vectors at #300 are now initialized

This commit is contained in:
FeralChild64 committed 2019-09-27 20:06:23 +02:00
1 parent 72a60958e9
commit 2abda0944b
4 files changed
+110 -12

No files matched your search

+6 -6
View File
@@ -193,12 +193,12 @@
// [!] XXX document $2A7-$2FF usage
// BASIC vectors
.label IERROR = $300 // $300-$301 -- NOT IMPLEMENTED --
.label IMAIN = $302 // $302-$303 -- NOT IMPLEMENTED --
.label ICRNCH = $304 // $304-$305 -- NOT IMPLEMENTED --
.label IQPLOP = $306 // $306-$307 -- NOT IMPLEMENTED --
.label IGONE = $308 // $308-$309 -- NOT IMPLEMENTED --
.label IEVAL = $30A // $30A-$30B -- NOT IMPLEMENTED --
.label IERROR = $300 // $300-$301
.label IMAIN = $302 // $302-$303
.label ICRNCH = $304 // $304-$305
.label IQPLOP = $306 // $306-$307
.label IGONE = $308 // $308-$309
.label IEVAL = $30A // $30A-$30B
.label SAREG = $30C // .A storage, for SYS call
.label SXREG = $30D // .X storage, for SYS call
+9 -1
View File
@@ -1,7 +1,15 @@
// BASIC Cold start entry point
// Compute's Mapping the 64 p211
basic_cold_start:
basic_cold_start:
// Setup vectors at $300
ldy #$0B
!:
lda basic_vector_defaults, y
sta IERROR, y
dey
bpl !-
// Print startup banner
jsr printf // XXX don't use printf, keep it for debug purposes only
+16
View File
@@ -0,0 +1,16 @@
//
// Default values for BASIC vectors - described in:
//
// - [RG64] C64 Programmer's Reference Guide - pages 68-70
// - [CM64] Compute's Mapping the Commodore 64 - page 318
//
basic_vector_defaults:
.word ERROR // IERROR
.word MAIN // IMAIN
.word CHRNCH // ICHRNCH
.word QPLOP // IQPLOP
.word GONE // IGONE
.word EVAL // IEVAL
+79 -5
View File
@@ -1,82 +1,156 @@
//
// Default handler for all not-yet-implemented commands
//
// Note: NOPs are here just to make debugging easier!
//
cmd_for:
nop
cmd_next:
nop
cmd_data:
nop
cmd_inputhash:
nop
cmd_input:
nop
cmd_dim:
nop
cmd_read:
nop
cmd_let:
nop
cmd_if:
nop
cmd_restore:
nop
cmd_gosub:
nop
cmd_return:
nop
// $90-$9F
cmd_on:
nop
cmd_wait:
nop
cmd_save:
nop
cmd_verify:
nop
cmd_def:
nop
cmd_poke:
nop
cmd_printhash:
nop
cmd_print:
nop
cmd_cont:
nop
cmd_cmd:
nop
cmd_open:
nop
// $A0-$AF
cmd_close:
nop
cmd_get:
nop
cmd_tab:
nop
cmd_to:
nop
cmd_fn:
nop
cmd_spc:
nop
cmd_then:
nop
cmd_not:
nop
cmd_step:
nop
cmd_plus:
nop
cmd_minus:
nop
cmd_mult:
nop
cmd_div:
nop
cmd_exponent:
nop
cmd_and:
nop
// $B0-$BF
cmd_or:
nop
cmd_greater:
nop
cmd_equal:
nop
cmd_less:
nop
cmd_sgn:
nop
cmd_int:
nop
cmd_abs:
nop
cmd_usr:
nop
cmd_fre:
nop
cmd_pos:
nop
cmd_sqr:
nop
cmd_rnd:
nop
cmd_log:
nop
cmd_exp:
nop
cmd_cos:
nop
cmd_sin:
nop
// $C0-$CF
cmd_tan:
nop
cmd_atn:
nop
cmd_peek:
nop
cmd_len:
nop
cmd_str:
nop
cmd_val:
nop
cmd_asc:
nop
cmd_chr:
nop
cmd_left:
nop
cmd_right:
nop
cmd_mid:
nop
cmd_go:
nop
// Undefined tokens
cmd_unimplemented:
jmp do_NOT_IMPLEMENTED_error