65C02 Version of EhBasic
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
65C02 Version of EhBasic
I finally got around to finishing up some new updates to my previous CMOS only version of EhBasic. It's based on the latest 2.22p4 from Klaus. To keep it short, some stuff removed, like all IRQ/NMI code, added an EXIT command, streamlined startup code for a RAM test (no user input) and added LOAD/SAVE using the Xmodem-CRC functions in my C02Monitor. The finished code is exactly 9.75KB in size (9984 bytes) and has a few other nice updates as well, like Mike Barry's change to the CHRGET (equivalent) routine, which is a measurable performance improvement. I'll get around to posting my latest version 2.03 C02BIOS and C02Monitor code shortly, which is what this version of EhBasic works with.
If anyone would like to use it with a different BIOS/Monitor, modifications should be very minimal. Hope others find it useful. Enjoy!
If anyone would like to use it with a different BIOS/Monitor, modifications should be very minimal. Hope others find it useful. Enjoy!
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 65C02 Version of EhBasic
floobydust wrote:
I finally got around to finishing up some new updates to my previous CMOS only version of EhBasic. It's based on the latest 2.22p4 from Klaus. To keep it short, some stuff removed, like all IRQ/NMI code, added an EXIT command, streamlined startup code for a RAM test (no user input) and added LOAD/SAVE using the Xmodem-CRC functions in my C02Monitor. The finished code is exactly 9.75KB in size (9984 bytes) and has a few other nice updates as well, like Mike Barry's change to the CHRGET (equivalent) routine, which is a measurable performance improvement. I'll get around to posting my latest version 2.03 C02BIOS and C02Monitor code shortly, which is what this version of EhBasic works with.
If anyone would like to use it with a different BIOS/Monitor, modifications should be very minimal. Hope others find it useful. Enjoy!
If anyone would like to use it with a different BIOS/Monitor, modifications should be very minimal. Hope others find it useful. Enjoy!
Cheers,
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
Thanks Gordon.
Simple changes... modified memory test, Load and Save vectors handle everything sans the actual Xmodem transfer and Mike Barry’s change makes it a tiny bit quicker. Can’t see having anything broken from the previous version, albeit some of the error messages are shorter, i.e., without goes to w/o.
Simple changes... modified memory test, Load and Save vectors handle everything sans the actual Xmodem transfer and Mike Barry’s change makes it a tiny bit quicker. Can’t see having anything broken from the previous version, albeit some of the error messages are shorter, i.e., without goes to w/o.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 65C02 Version of EhBasic
All the updates to ehBasic are sub-sub-versions of 2.22: 2.22, 2.22patch, 2.22patch2, 2.22patch3, 2.22patch4variantC. Shouldn't there be a co-ordinated rollover to 2.23? or 2.30?
--
JGH - http://mdfs.net
JGH - http://mdfs.net
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
jgharston wrote:
All the updates to ehBasic are sub-sub-versions of 2.22: 2.22, 2.22patch, 2.22patch2, 2.22patch3, 2.22patch4variantC. Shouldn't there be a co-ordinated rollover to 2.23? or 2.30?
The CMOS version I've done is more for my own use, which is limited. It doesn't really contain any new commands, sans the EXIT command that goes back to my Monitor. I've also deleted some of the code which, according to Klaus, didn't really work properly, like the IRQ and NMI functions. All of the other changes are to reduce code size, gain a slight performance advantage and make it easier to move between 65C02 systems.
Perhaps some of the other players out here could chime in on a possible version change, I simply added the "C" to the version to specify that it's a CMOS only version.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
Re: 65C02 Version of EhBasic
floobydust wrote:
jgharston wrote:
All the updates to ehBasic are sub-sub-versions of 2.22: 2.22, 2.22patch, 2.22patch2, 2.22patch3, 2.22patch4variantC. Shouldn't there be a co-ordinated rollover to 2.23? or 2.30?
The CMOS version I've done is more for my own use, which is limited. It doesn't really contain any new commands, sans the EXIT command that goes back to my Monitor. I've also deleted some of the code which, according to Klaus, didn't really work properly, like the IRQ and NMI functions. All of the other changes are to reduce code size, gain a slight performance advantage and make it easier to move between 65C02 systems.
Perhaps some of the other players out here could chime in on a possible version change, I simply added the "C" to the version to specify that it's a CMOS only version.
Code: Select all
TK_RESTORE = TK_IF+1 ; RESTORE token
TK_GOSUB = TK_RESTORE+1 ; GOSUB token
TK_RETIRQ = TK_GOSUB+1 ; RETIRQ token
TK_RETNMI = TK_RETIRQ+1 ; RETNMI token
TK_RETURN = TK_RETNMI+1 ; RETURN tokenCode: Select all
.word LAB_GOSUB-1 ; GOSUB
.word SYNTAX_ERROR
.word SYNTAX_ERROR
.word LAB_RETURN-1 ; RETURN--
JGH - http://mdfs.net
JGH - http://mdfs.net
Re: 65C02 Version of EhBasic
floobydust wrote:
jgharston wrote:
The CMOS version I've done is more for my own use, which is limited. It doesn't really contain any new commands, sans the EXIT command that goes back to my Monitor.
Code: Select all
FOR A=1 TO 10
IF A=5 THEN EXIT:REM Drop out of FOR/NEXT loop
PRINT A
NEXT A
QUIT:REM Quit BASIC, return to caller/monitor/etc--
JGH - http://mdfs.net
JGH - http://mdfs.net
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
jgharston wrote:
floobydust wrote:
jgharston wrote:
All the updates to ehBasic are sub-sub-versions of 2.22: 2.22, 2.22patch, 2.22patch2, 2.22patch3, 2.22patch4variantC. Shouldn't there be a co-ordinated rollover to 2.23? or 2.30?
The CMOS version I've done is more for my own use, which is limited. It doesn't really contain any new commands, sans the EXIT command that goes back to my Monitor. I've also deleted some of the code which, according to Klaus, didn't really work properly, like the IRQ and NMI functions. All of the other changes are to reduce code size, gain a slight performance advantage and make it easier to move between 65C02 systems.
Perhaps some of the other players out here could chime in on a possible version change, I simply added the "C" to the version to specify that it's a CMOS only version.
Code: Select all
TK_RESTORE = TK_IF+1 ; RESTORE token
TK_GOSUB = TK_RESTORE+1 ; GOSUB token
TK_RETIRQ = TK_GOSUB+1 ; RETIRQ token
TK_RETNMI = TK_RETIRQ+1 ; RETNMI token
TK_RETURN = TK_RETNMI+1 ; RETURN tokenCode: Select all
.word LAB_GOSUB-1 ; GOSUB
.word SYNTAX_ERROR
.word SYNTAX_ERROR
.word LAB_RETURN-1 ; RETURNAlso, on the EXIT vs QUIT (another valid point). As EhBasic doesn't have an EXIT command, picking EXIT was a choice, which can be easily changed.
Adding in the older tokens to preserve the original token numbers can be easily done of course. It's unclear how valuable it would be, beyond declaring full token compatibility with the original 2.22 source.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: 65C02 Version of EhBasic
I have been running into the same quandary regarding version numbers (or letters) on my VTL02. I have been intermittently fiddling with version C, squeezing a few bytes here and there, but I haven't added any new features, so I don't want to release anything as version D until I have enough space inside 1K to add something noticeable to the end user. Also, many of my source changes have been untested, because SBASM3 uses Python, and assembling stuff with it isn't as fun as I thought it would be on Windoze.
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: 65C02 Version of EhBasic
barrym95838 wrote:
I have been running into the same quandary regarding version numbers (or letters) on my VTL02. I have been intermittently fiddling with version C, squeezing a few bytes here and there, but I haven't added any new features, so I don't want to release anything as version D until I have enough space inside 1K to add something noticeable to the end user. Also, many of my source changes have been untested, because SBASM3 uses Python, and assembling stuff with it isn't as fun as I thought it would be on Windoze.
--
JGH - http://mdfs.net
JGH - http://mdfs.net
Re: 65C02 Version of EhBasic
floobydust wrote:
All valid points... but again, the changes made were for my own use. Also, as LOAD and SAVE were never really implemented in the base code, Lee suggested that intercepting the LIST command for SAVE would be his preferred method as it would be an ASCII file, which would be easier to examine, edit and LOAD into other BASIC implementations. But I understand your points and they're completely valid.
floobydust wrote:
Also, on the EXIT vs QUIT (another valid point). As EhBasic doesn't have an EXIT command, picking EXIT was a choice, which can be easily changed.
-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
drogon wrote:
floobydust wrote:
All valid points... but again, the changes made were for my own use. Also, as LOAD and SAVE were never really implemented in the base code, Lee suggested that intercepting the LIST command for SAVE would be his preferred method as it would be an ASCII file, which would be easier to examine, edit and LOAD into other BASIC implementations. But I understand your points and they're completely valid.
floobydust wrote:
Also, on the EXIT vs QUIT (another valid point). As EhBasic doesn't have an EXIT command, picking EXIT was a choice, which can be easily changed.
-Gordon
While my Monitor isn't considered an OS, it does provide a RESET function (does a cold start). It also has a large amount of function for a Monitor... which is pretty handy at times.
************************************************************
Memory Ops: [C]ompare, [D]isplay, [E]dit, [F]ill, [G]o Exec,
[H]ex Find, nput Text, [M]ove, [T]ext Find
Register Ops: R,A,X,Y,S,P
Counter/Timer Ops: ,= set ms|mult, .= exe ms, /= exe ms*mult, \= exe (?)*ms*mult
enchmark clear/start, [Q]uit benchmark/display elapsed time
Macro: (= Init )= Run
CTRL[?]: [A]ssemble, asic, [D]isassemble, [E]dit EEPROM, [L]oad, [P]rogram,
[Q]uery Cmds ,[R]eset, [S]ave, [T]ime up, [V]ersion, [Z]ero RAM/Reset
************************************************************
Unfortunately, the Assembler isn't finished yet.... actually, I haven't started working on it yet, so that one is a place holder
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
As Klaus has implemented some updates to EhBasic (resulting in 2.22p5), I've added these updates to my CMOS version as well. Attached is a zip file with the updated version.
Regards, KM
https://github.com/floobydust
https://github.com/floobydust
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: 65C02 Version of EhBasic
Hey, thanks for the shout-out on line 7440!
Your assembler is going to have the Rockwell BBSx/BBRx/RMBx/SMBx stuff too, right?
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
- floobydust
- Posts: 1394
- Joined: 05 Mar 2013
Re: 65C02 Version of EhBasic
barrym95838 wrote:
Hey, thanks for the shout-out on line 7440!
Your assembler is going to have the Rockwell BBSx/BBRx/RMBx/SMBx stuff too, right?
Adding this line to the source code enables ALL of the extended opcodes and addressing modes:
CHIP W65C02S ;Enable WDC 65C02 instructions
Regards, KM
https://github.com/floobydust
https://github.com/floobydust