Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ac6502/ac6502.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
# SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
#
# SPDX-License-Identifier: MIT
#
Expand Down
2 changes: 1 addition & 1 deletion ac6502/ac6502.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
;
; SPDX-License-Identifier: MIT
;
Expand Down
10 changes: 2 additions & 8 deletions ac6502/ac6502_extension.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
;
; SPDX-License-Identifier: MIT
;
Expand Down Expand Up @@ -48,16 +48,10 @@ ex_statement_name_table:

; Helper PVM fragments for 3- and 4-argument statements.

ex_pvm_arg_3:
CALL pvm_expression
ARGSEP
CALL pvm_expression
ARGSEP
JUMP pvm_expression

ex_pvm_arg_4:
CALL pvm_expression
ARGSEP
ex_pvm_arg_3:
CALL pvm_expression
ARGSEP
CALL pvm_expression
Expand Down
21 changes: 5 additions & 16 deletions ac6502/ac6502_init.s
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
;
; SPDX-License-Identifier: MIT
;
; ac6502 BASIC workspace (buffers and interpreter stacks) and the
; target-specific one-time initialization hook. All mutable storage is
; placed in the BSS segment so __BSS_SIZE__ correctly reflects how much
; RAM is consumed before the user program area. BASIC's program_ptr is
; computed from __BSS_RUN__ + __BSS_SIZE__ (see program.s).
; ac6502 BASIC workspace (buffers and interpreter stacks). All mutable
; storage is placed in the BSS segment so __BSS_SIZE__ correctly reflects
; how much RAM is consumed before the user program area. BASIC's
; program_ptr is computed from __BSS_RUN__ + __BSS_SIZE__ (see program.s).
;
; See https://github.com/acwright/6502 for more info

Expand All @@ -26,14 +25,4 @@ line_buffer: .res BUFFER_SIZE
stack: .res PRIMARY_STACK_SIZE
op_stack: .res OP_STACK_SIZE

.segment "ONCE"

; initialize_target is invoked from the cartridge startup after BIOS
; hardware has been initialized and interrupts have been enabled. All
; we need to do here is display the BASIC banner; I/O goes through the
; BIOS via Chrout / Chrin.

initialize_target:
jmp display_startup_banner

.code
2 changes: 1 addition & 1 deletion ac6502/ac6502_io.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
;
; SPDX-License-Identifier: MIT

Expand Down
4 changes: 2 additions & 2 deletions ac6502/ac6502_startup.s
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn
; SPDX-FileCopyrightText: 2022-2026 Willis Blackburn / 2026 A.C. Wright
;
; SPDX-License-Identifier: MIT
;
Expand All @@ -23,7 +23,7 @@ startup:
; Leaves interrupts disabled; caller must CLI.
jsr Beep ; Play the startup beep
cli ; Enable interrupts (keyboard, serial RX)
jsr initialize_target ; BASIC-side target init (banner, etc.)
jsr display_startup_banner ; Display the BASIC banner
jmp main ; Enter the BASIC REPL (never returns)

; IRQ / NMI trampolines -- dispatch through the RAM vectors that
Expand Down
Loading