extended BASIC simplification
This commit is contained in:
1 parent
9a4e521eff
commit
a92e0006b3
2 files changed
+6
-24
No files matched your search
@@ -104,6 +104,6 @@ A 'native' `SYS` - same as `SYS`, but does not switch to C64 compatibility mode.
|
|||||||
|
|
||||||
Switches machine to C64 compatibility mode or to MEGA65 native mode. Performs `CLR`
|
Switches machine to C64 compatibility mode or to MEGA65 native mode. Performs `CLR`
|
||||||
|
|
||||||
### `GO 65 SYS` (MEGA65)
|
### `GO SYS` (MEGA65)
|
||||||
|
|
||||||
The same as `GO 65: NSYS`, but does not need tokens unknown to C64 BASIC V2. Intended for usage in 'fat binaries' only.
|
The same as `NSYS`, but does not need tokens unknown to C64 BASIC V2. Intended for usage in 'fat binaries' only.
|
||||||
@@ -19,6 +19,9 @@ cmd_go_syntax_error:
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
cmp #$9E // 'SYS' keyword, for 'GO SYS'
|
||||||
|
beq_16 cmd_nsys
|
||||||
|
|
||||||
dew TXTPTR // unconsume character
|
dew TXTPTR // unconsume character
|
||||||
|
|
||||||
// Fetch desired mode
|
// Fetch desired mode
|
||||||
@@ -45,17 +48,12 @@ cmd_go_syntax_error:
|
|||||||
// If in C64 compatibility mode - switch to native mode
|
// If in C64 compatibility mode - switch to native mode
|
||||||
|
|
||||||
jsr M65_MODEGET
|
jsr M65_MODEGET
|
||||||
bcs !+
|
bcc cmd_go_rts
|
||||||
jsr cmd_go_sys_check
|
|
||||||
rts
|
|
||||||
|
|
||||||
!:
|
|
||||||
jsr helper_ask_if_sure
|
jsr helper_ask_if_sure
|
||||||
bcs_16 cmd_end
|
bcs_16 cmd_end
|
||||||
jsr M65_MODESET // Carry clear = switch to M65 mode
|
jsr M65_MODESET // Carry clear = switch to M65 mode
|
||||||
|
|
||||||
jsr cmd_go_sys_check
|
|
||||||
|
|
||||||
// FALLTROUGH
|
// FALLTROUGH
|
||||||
|
|
||||||
cmd_go_switchmode_clr_banner:
|
cmd_go_switchmode_clr_banner:
|
||||||
@@ -69,22 +67,6 @@ cmd_go_switchmode_clr_banner:
|
|||||||
lda #147
|
lda #147
|
||||||
jmp JCHROUT
|
jmp JCHROUT
|
||||||
|
|
||||||
cmd_go_sys_check:
|
|
||||||
|
|
||||||
// Check for 'GO 65 SYS' construction
|
|
||||||
|
|
||||||
jsr fetch_character_skip_spaces
|
|
||||||
cmp #$9E // 'SYS' keyword
|
|
||||||
bne !+
|
|
||||||
|
|
||||||
pla
|
|
||||||
pla
|
|
||||||
jmp cmd_nsys
|
|
||||||
!:
|
|
||||||
dew TXTPTR // unconsume character
|
|
||||||
|
|
||||||
// FALLTROUGH
|
|
||||||
|
|
||||||
cmd_go_rts:
|
cmd_go_rts:
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|||||||
Reference in new issue
Block a user