PDA

View Full Version : SBASIC question



phogren
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?
EXAMPLE:
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

Chuck(G)
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?

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



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

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

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

phogren
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

Chuck(G)
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...