Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic bank statement #340

Merged
merged 15 commits into from
Oct 23, 2022
Merged

Basic bank statement #340

merged 15 commits into from
Oct 23, 2022

Conversation

stefan-b-jakobsson
Copy link
Contributor

@stefan-b-jakobsson stefan-b-jakobsson commented Oct 15, 2022

Implementation of a new BANK statement in BASIC.

The bank set by BANK is used by SYS, POKE and PEEK if the target address is >= $a000

Example (starts GEOS by calling $C000 in ROM bank 3):

BANK 3
SYS $C000

basic/code17.s Outdated
txa
ldx curbank
ldy #0
jsr stash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine to jsr & rts to jmp stash

basic/token2.s Outdated
@@ -81,6 +81,7 @@ reslst2 .byt "MO", 'N' + $80
.byt "BLOA", 'D' + $80
.byt "BVLOA", 'D' + $80
.byt "BVERIF", 'Y' + $80
.byt "BAN", 'K'+$80
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"space plus space" for consistency

basic/init.s Outdated
@@ -14,6 +14,7 @@ nready jmp readyx
init jsr initv ;go init vectors
jsr initcz ;go init charget & z-page
jsr initms ;go print initilization messages
stz curbank ;set default value for BANK statement
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spaces for indenting the comments, please

cfg/x16.cfginc Outdated
@@ -33,7 +33,8 @@ KVECTORS: start = $0314, size = $0020; # KERNAL vectors
/* $0334-$03FF: variables and RAM code (not available for *legacy* GEOS apps) */
KVAR2: start = $0334, size = $0057; # KERNAL: screen editor table
KERNRAM2: start = $038B, size = $003F; # KERNAL: banked IRQ, fetch, stash
/* start = $03CA, size = $0002; # reserved for KERNAL growth */
BVARS2: start = $03CA, size = $0001; # BASIC
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to create a new segment; at this point, it's okay to extend the BVARS segment by 1 byte, moving FPVARS up by 1 byte – we don't try to guarantee binary compatibility with these addresses yet

@stefan-b-jakobsson
Copy link
Contributor Author

I think I fixed all comments from @mist64

This reverts commit abfd291.
@stefan-b-jakobsson
Copy link
Contributor Author

stefan-b-jakobsson commented Oct 23, 2022

By mistake a change in the GEOS launch code intended for my other PR (fix-geos) had sneaked in here. It was removed with git revert (commit 780b786) above.

replaced tabs with spaces
@mist64 mist64 merged commit 52b2568 into commanderx16:master Oct 23, 2022
@irmen
Copy link
Contributor

irmen commented Oct 23, 2022

Should the LOAD commands also consider the BANK ?

@mist64
Copy link
Collaborator

mist64 commented Oct 24, 2022

Should the LOAD commands also consider the BANK ?

LOAD and SAVE could benefit from this, yes!

#345

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants