danwinslow Posted February 14, 2006 Share Posted February 14, 2006 On an XL/XE, is it just a matter of setting the PORTB bit appropriately? That is, if I have a small program set that bit and exit, will subsequent programs think that basic is off still? Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 14, 2006 Share Posted February 14, 2006 (edited) Yes. just set bit 1 (OR with #2) to disable the BASIC ROM. To make BASIC stay away at the next warmstart (Reset), store any non-zero value in location 1016 ($3F8). But, make sure you have some program for the OS to run (ie, set DOSVEC [$A]) else the Self-Test will be run. To do things cleanly, you should also set RAMTOP and MEMSIZ (decimal 740 and 106) to 192, then re-open the E: device. That will set the other high-memory pointers right as well. But, that only applies if it's a 64K machine. Edited February 14, 2006 by Rybags Quote Link to comment Share on other sites More sharing options...
danwinslow Posted February 14, 2006 Author Share Posted February 14, 2006 Thanks, Rybags. So dosvec gets jumped through on warmstart, that makes sense. The graphics call is to reset the memory bounds, in the assumption that basic has changed them? In other words, is that necessary even if the basic cart has never been used to run anything? Quote Link to comment Share on other sites More sharing options...
Rybags Posted February 14, 2006 Share Posted February 14, 2006 Reopening the screen after altering RAMTOP is to clean up the memory pointers. Otherwise, you're left with screen memory still sitting around $9C00-$9FFF and free RAM from $A000-$BFFF. When there is no cartridge or BASIC, the sequence during warm/coldstart is: check location 9 (boot flags, bit0=1 means disk has booted, bit1=1 means cassette has booted). Jump to cassette and disk initialize routines through locations (2,3) and ($C,$D) if their bootflag bits are 1, return is expected. Jump through DOSVEC ($A,$B) - no return is expected (or possible) - so this will call the DOS menu, or run your program, or just go to Memo Pad or Self-Test. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.