MACBAS95 - A macro-assembler, monitor, debugger and sourcer for the Sharp PC-1500 and the TRS80 PC-2

MacBas95 for Sharp PC-1500 +16 KB (CE-161 or CE-163 RAM).
© C.Gottheimer, 1990-1995-2012
Download zipped WAV (95KB).

Description:

MacBas95 gives you access to the full power of ML (machine language), with a macro assembler, a sourcer and a debugger embedded with the BASIC.
With MacBas95, you can write BASIC programs containing assembly instructions, debug the ML programs directly from BASIC, using the same environment, list or recreate assembly programs from the ML code.

Note 1: MacBas95 itself fills 8KB RAM and uses addresses &00C5..&1FFF.
A CE-161 or CE163 RAM module is necessary, as well as a PC-1500 with a "new ROM" version (test: PEEK &E2B9 [ENTER] should give 56).

Note 2: MacBas95 IS NOT compatible with the CE-150 printer and the CE-158 RS232 interface, because they use the same memory zones for storing system data.
Before printing, you must reinitialize the printer.
After printing, the data, pointers and registers of MabBasS95 are lost. You need to reassign them with ASM or REGS.

Example:

Type the following code:
10 ASM &2000,&20FF,&2100,&21FF
20 "STRLOWER":DEC L
30 IF. C
40 BEGIN
41 LDA (BC)
42 CPA ASC("A"):JR NC,"NUPPER"
43 CPA ASC("Z")+1:JR C,"NUPPER"
44 OR. ASC("a")-ASC("A"):STA (BC)
45 "NUPPER":INC BC
46 UNTIL DJC
50 ENIF
60 SCF: RET
70 END.

Execute with RUN, and wait for 3 seconds. The code will be assembled.
In PRO mode, typing DEF (down-arrow) will show:
2000="STRLOWER":DEC L
Use (down-arrow) to see the next instruction:
2001:JR NC,&2012

Now execute it (A$ is at address &78C0 and the string has 16 characters).
A$="TH!S 1s MaCBaS95"
EXEC &2000;,&78C0,,16
A$
and you will see: th!s 1s macbas95

You can execute it step by step by doing EXEC TRON &2000;,,&78C0,,16

Now, do NEW to clear the current program, and call the sourcer SRCS:
NEW
SRCS &2000,&2013,,&2100
And now do LIST and use the (down-arrow) to show the ML program sourced:
LIST
10:"STRLOWER":DEC L
20:JR NC,"L002"
30:"L001":LDA (BC)
40:CPA &41
...etc...
130:RET

More explanations in the README file provided with the zip archive.


Return to the main page