View Full Version : SBASIC question

May 26th, 2013, 05:53 PM
Is there a way to compile a SBASIC program and NOT have it do a warm boot after the program executes?
10 print chr$(26);

Save it and call it CLS.BAS
compile it and put in in A0: it gives the CLS command.
Or is there a simpler way to clear the screen on a Kaypro?
Yes, I know CTRL Z

May 26th, 2013, 06:06 PM
Are you just trying to issue the sequence to do a clear screen as a standalone program?

If so, why not assembly--why haul around the baggage that comes with SBASIC?

May 26th, 2013, 06:51 PM
You don't even need to learn ED...

ddt vers 2.2
0100 mvi c,2
0102 mvi e,26
0104 call 5
0107 ret
a>save 1 cls.com

May 26th, 2013, 08:38 PM
Um, ahm--shouldn't that be "mvi e, 1a"? DDT doesn't do decimal.

May 27th, 2013, 04:08 AM
So much for the exercise left to the reader.

May 28th, 2013, 08:25 AM
Thanks, it was just an exercise for me trying to learn. Using DDT worked after changing the 26 to 1A.
I've always been good with the hardware but now that I'm retired trying to learn some of the programming.
I did a lot of file conversions in the 80's when people were dropping CP/M and switching to DOS but that was not too difficult.

BTW Thanks

May 28th, 2013, 08:52 AM
You can shorten the program by 1 byte if you change the CALL to a JMP and leave off the RET. Practically speaking, it doesn't matter; just something for the obsessive...