|
Post by trainmaster on Jan 21, 2016 18:37:02 GMT
On one of my old discs I found Basic 7.1. There are very few references to this BASIC 7.0 addon on the internet, the only one I know of is at the official VICE page over at sourceforge here that lists the BASIC 7.1 keywords and their corresponding BASIC token. Anyone else know where this came from? I think it might have been a type-in program in some magazine back in the days, but I'm not sure.
You can download the D64 here. Use BLOAD to load it since it occupies the address space 4909 ($132D) - 7167 ($1BFF). Once loaded, type SYS 4909 to initiate it. After you do the C128 will sort of reboot and you will see the following altered start page:
You will now have 17 additional BASIC commands at your disposal as follows:
Command | Syntax | BASIC token | CWIND | color,shadow | $FE27 | SSCRN | page | $FE28 | LSCRN | page | $FE29 | HIDE | type | $FE2A | SHOW | type | $FE2B | SFONT | charset,"file name"(,Ddrive)(ON Udevice) | $FE2C | LFONT | charset,"file name"(,Ddrive)(ON Udevice) | $FE2D | VIEW | "file name"(,Ddrive)(ON Udevice) | $FE2E | FCOPY | target,"file name,file type"(,Ddrive)(ON Udevice) | $FE2F | ESAVE | "file name"(,Ddrive)(ON Udevice) | $FE30 | SEND | "command string"(,Ddrive)(ON Udevice) | $FE31 | CHECK | CHECK device #(,channel #) | $FE32 | ESC | letter | $FE33 | OLD | | $FE34 | FIND | string | $FE35 | DUMP | | $FE36 | MERGE | "file name"(,Ddrive)(ON Udevice) | $FE37 |
|
|
|
Post by hydrophilic on Jan 21, 2016 21:12:00 GMT
I can only imagine what they do... some of them sound the same/similar to extra commands on some C64 enhancements. Things like OLD, FIND, and MERGE. I bet FIND and MERGE would be really handy for hard-core BASIC programmers. SEND, CHECK and FCOPY seem like DOS wedges. SFONT and LFONT sound real handy for 80-column hackers (also LSCRN and SSCRN). I have no idea what HIDE, SHOW, and VIEW do...
Thanks for sharing!
[Edit] I played around with this. Here is what I discovered...
CWND sets the left half of the 80-column to reverse video in the specified color. I don't know what shadow does.
SSCRN and LSCRN will save and load (respectively) the entire 80-column screen (text and attributes) to a buffer. Presumably you can have multiple screens saved, and specify which you want with page. I only tried it with page=1 in VICE (with 64K VRAM).
HIDE and SHOW ? They didn't have any obvious effect...
SFONT and LFONT will save and load (respectively) an 80-column font (9 blocks on disk). charset should be 0 for the upper/graphics font, and 1 for the upper/lower-case font. After loading the second (upper/lower font), the last line of text became corrupt when I tried it.
VIEW will print a PETSCII text file to the screen. I suspect you could use OPEN4,4:CMD 4 with this to print it on paper. I wish there were an option for ASCII.
SEND sends a command to a serial-bus device. I only tested it with disk (unit 8). Because it uses the [,ON] U(device) format, I suspect it may fail with any device outside of 8 to 11.
CHECK ... it seems to do nothing most of the time. If you send the drive a long-time-to-execute command (such as validate), then it will wait for the device to be ready again. It does not print any type of status (like PRINT DS$, which will also wait for the drive to complete its current task). Might be useful for FCOPY ?
ESC performs one of the escape-key functions, like ESC W to scroll the entire screen down 1 line. Less cumbersome than the PRINT CHR$ method.
OLD restores program after NEW
FIND searches BASIC program for the quoted string and lists every/any program line which contains that string. Useful to find occurrences of a program number (GOTO 1000, GOSUB 2000, etc.) or assignment of a variable ("X=") for example.
DUMP is rather nice and little buggy. It will list all scalar (non-array) variables and the current value of each. Besides not listing arrays (which is probably a good thing), it prints garbage for user functions (like FNY(X)=X*X-1).
I didn't test ESAVE, FCOPY or MERGE.
BASIC 7.1 works fine with SAM 128. I haven't tested, but I suspect it will royally fail with BASIC 7.80 and BASIC 8 due to the fact of shared resources (memory in the $1300~$1bff region).
[/Edit]
|
|
|
Post by buzbard on Jan 24, 2016 18:04:42 GMT
Interesting, were there no other documents on the disk?
The CWIND shadow parameter only works for windows created on the 80 column screen and only if the main background color is not black. A value of zero is no shadow and non-zero displays a shadow.
10 graphic5,1 20 color6,2 30 window5,5,30,20,1 40 cwind3,0:print"{home}{black}red no shadow 50 window40,5,65,20,1 60 cwind7,1:print"{home}{black}blue with shadow
I disassembled the code, SHOW and HIDE are supposed to show or hide portions of the 80 column display but the code doesn't seem to work in VICE. The code modifies VDC registers $22 and $23 which are (from Compute's Mapping the Commodore 128):
34/$22 Beginning position for horizontal blanking 35/$23 Ending position for horizontal blanking
|
|
|
Post by trainmaster on Jan 25, 2016 4:07:29 GMT
Nice work so far guys I'm afraid the only documentation I have is the one in my first post. And there were no other files on the disc. It would be really nice to be able to create a more extensive documention on this Basic extension so please let us know if you find out more
|
|
|
Post by buzbard on Jan 28, 2016 21:08:20 GMT
Ok, ESAVE seems to BSAVE a copy of BASIC 7.1 plus whatever BASIC program is in memory. Obviously the author intended a BASIC boot program to be included, probably a simple SYS line.
MERGE does what you might think, it merges a program on disk with the one in memory. If the programs have the same line numbers the one in memory will not be overwritten.
|
|
|
Post by hydrophilic on Jan 31, 2016 0:35:39 GMT
Thanks for the info, buzbard! It is really sad that "display enable begin/end" registers do not work in VICE... their function is much easier to implement (IMHO) than stuff like underlined or reversed characters (because the later is localized to individual characters, whereas the former is global... similar to background color or number of rows).
|
|
|
Post by robertb on Feb 18, 2016 3:44:11 GMT
BASIC 7.1 works fine with SAM 128. I haven't tested, but I suspect it will royally fail with BASIC 7.80 and BASIC 8 due to the fact of shared resources (memory in the $1300~$1bff region). Can the command functions of BASIC 7.1 be combined with those of BASIC 7.80 in order to make a new BASIC 7.8x? Truly, Robert Bernardo Fresno Commodore User Group www.dickestel.com/fcug.htm
|
|
|
Post by hydrophilic on Feb 21, 2016 8:35:14 GMT
Can the command functions of BASIC 7.1 be combined with those of BASIC 7.80 in order to make a new BASIC 7.8x? Sadly, no. Both BASIC 7.1 and BASIC 7.80 use the ever popular $1300~$1BFF region of Bank 0 RAM. I have been thinking of ways to move some of the 7.80 code out of that popular region... the idea (if successful), would make BASIC 7.80 more complex and very slightly slower (i.e., add 6~15 CPU cycles for a "long jump/call" which is very minor when the "main" code uses 1000+ CPU cycles). If I did that to the extreme, then BASIC 7.80 *might* only use the area $1A00~$1BFF (for example)... this would make BASIC 7.80 more compatible with *some* utilities... but as I recall, both BASIC 7.1 and BASIC 8 use all (or almost all) of the $1300~$1BFF region (thus an attempt to use them together they would fail). In other words, even if I "crunched" BASIC 7.80 to use minimum RAM in the $1300~$1BFF region, it would still not work with BASIC 7.1 (or BASIC 8) unless somebody were to crunch *them* to also use less of that popular RAM region... The only alternative I can think of (and it would be really cool but beyond my capabilities), is to install BASIC 7.80 into the internal/function ROM! Umm... now that I think about it, I have never tested my BASIC 7.80 (software) with BASIC 8 (ROM)... would this actually work? I have no way to test...
|
|
|
Post by robertb on Feb 22, 2016 2:11:42 GMT
The only alternative I can think of (and it would be really cool but beyond my capabilities), is to install BASIC 7.80 into the internal/function ROM! Umm... now that I think about it, I have never tested my BASIC 7.80 (software) with BASIC 8 (ROM)... would this actually work? I have no way to test... Hmm, I had thought of that, too, i.e., installing BASIC 7.80 into the function ROM area. However, getting it onto the chip and having it work from the chip is beyond me. Perhaps I can ask a SCCAN member in March, Robert Bernardo Fresno Commodore User Group www.dickestel.com/fcug.htmSouthern California Commodore & Amiga Network www.sccaners.org
|
|
|
Post by trainmaster on Feb 27, 2016 23:02:35 GMT
The only alternative I can think of (and it would be really cool but beyond my capabilities), is to install BASIC 7.80 into the internal/function ROM! Umm... now that I think about it, I have never tested my BASIC 7.80 (software) with BASIC 8 (ROM)... would this actually work? I have no way to test...
You can test it now Hydrophilic, I've added the Basic 8 ROM here.
|
|