johnx993
Veteran Member
Try the BASIC/5 version for the Sol-20.
I don't think BASIC/5 even has strings at all, much less arrays of them.
I don't think BASIC/5 even has strings at all, much less arrays of them.
| VCF East | Apr 17 - 19, 2026, | InfoAge, Wall, NJ |
| VCF Latam | Apr 24 - 26, 2026, | Bahía Blanca, Argentina |
| VCF Pac. NW | May 02 - 03, 2026, | Tukwila, WA |
| VCF Southwest | May 29 - 31, 2026, | Westin Dallas Fort Worth Airport |
| VCF Southeast | Aug 01 - 02, 2026, | Atlanta, GA |
| VCF West | Aug 01 - 02, 2026, | Mountain View, CA |
| VCF Midwest | Sep 12 - 13, 2026, | Schaumburg Convention Center, IL |
| VCF Montreal | See you in 2027, | RMC Saint Jean, Montreal, Canada |
| VCF SoCal | See you in 2027, | Southern CA |
I'm referring to the BASIC/5 version in the list at Wayback. (sttr.bs5)I’ll try it! I saw a version for the Sol20, but it required a VDM-1 card and was ML based.
Starting to think I’ll write my own ML version just to teach myself 8080 ML.
There is an Altair version in the links that were provided, that uses a minimal number of string arrays (just for listing 5 strings of text) that I’m working around with fixed strings and if then statements. A little cumbersome, but I think it might work….
Thanks!
I’m finally killing Klingons! Although technically not on my IMSAI yet. I had to go the SimH route for another part of the IMSAI project and when I got CP/M running I took a little detour with MBASIC and got that version running. Too much funI found this version while poking around one of the SimH pre-builts. "basiccollection.zip" It's the same but different.
Me?So, tell us a little about your IMSAI setup.
It obviously is not running CP/M.
How are you loading BASIC to the machine?
CST: ; (CONSOLE STATUS)
IN TTS ; GET STATUS BYTE FROM USART
ANI TTYDA ; MASK BITS FOR "DATA AVAILABLE?"
JZ CST1 ; CONSOLE IS NOT READY
ORI 0FFH ; CONSOLE IS READY
CST1: RET
CIN: ; (CONSOLE INPUT)
;CALL CST ; GET STATUS
IN TTS
ANI TTYDA
JZ CIN ; WAIT FOR IT
IN TTI ; GET BYTE
ANI 7FH ; STRIP PARITY BIT
;CALL ledout ; JUST FOR WHIMSY - DISPLAY CHAR ON LEDS
RET
COT: ; (CONSOLE OUTPUT)
IN TTS ; GET STATUS BYTE FROM USART
ANI TTYTR ; MASK BITS FOR "TERMINAL READY?"
JZ COT ; NOT READY - LOOP BACK
MOV A,C ; DATA WAS PASSED FROM CALL PROGRAM VIA REG C
;CALL ledout ; JUST FOR WHIMSY - DISPLAY CHAR ON LEDS
OUT TTO ; SEND THE CHAR OUT
RET
;------------------
;IMSAI 8080 EQUATES
LEDS equ 0FFh ;IMSAI front panel output LEDs (top left)
SWCH equ 0FFh ;IMSAI front panel input switches (left)
TTS equ 03h ;SIO channel A command port
TTI equ 02h ;SIO channel A data port (yes input=output)
TTO equ 02h ;SIO channel A data port
TTYDA equ 02h ;tty data available (ready to receive?)
TTYTR equ 01h ;tty terminal ready (ready to transmit?)
;------------------
;ASCII characters used
NUL EQU 0 ; NULL (ZERO)
CR EQU 0DH ; Carriage return
LF EQU 0AH ; Line feed
CTRH EQU 8 ; Ctl H Backspace
DEL EQU 127 ; Delete char
TAB EQU 9 ; Tab char
CTRX EQU 24 ; Ctl X Cancel
CTRS EQU 19 ; Ctl S Suspend
CTRQ EQU 17 ; Ctl Q Resume
APOS EQU (39-'0') AND 0FFH ;apostrophe
;------------------
;RUN A CPM PROGRAM
; To run a CPM program this code:
; 1) Copies BDOS code to RAM @ BDLOC
; 2) Places a JMP to this code at 0005H
; 3) Places a JMP to wrmst at 0000H
; 4) Loads spaces to FCB (simulating no command line parameters)
; 5) CALLs 0100H
; NOTE: App calls BDLOC that then jumps to lbdos in EPROM
; App thinks BDLOC is real BDOS, but it's just a jump to real bdos in EPROM
run:
MVI A,0C3H ; put 'JMP lbdos' before monitor
STA BDLOC ; so calling apps can determine start of avail mem
LXI H,lbdos ;
SHLD BDLOC+1 ;
MVI A, 0C3H ; put 'JMP BDLOC' @0005H
STA BDOS ;
LXI H,BDLOC ;
SHLD BDOS+1 ;
MVI A, 0C3H ; put 'JMP START+3' @0000H (TO ALLOW APPS TO ACCESS BIOS)
STA 0H ;
LXI H,START+3 ; WARM START IS 2ND BIOS VECTOR, HENCE '+3'
SHLD 1H ;
MVI A,20H ; put <SPACE> in FCB
STA FCB ;
STA FCB+1 ; need more?
STA FCB+2 ; need more?
STA FCB+3 ; need more?
STA FCB+4 ; need more?
STA FCB+5 ; need more?
STA FCB+6 ; need more?
STA FCB+7 ; need more?
STA FCB+8 ; need more?
STA FCB+9 ; need more?
STA FCB+10 ; need more?
STA FCB+11 ; need more?
CALL TPA ; run the CPM program
JMP cldst ; for those apps using a 'RET' to exit
;------------------
; Simplified Core IO Routines
;------------------
;Console Input
intt:
CALL instat ;Check status
IN TTI ;Get byte
ANI DEL
CPI CTRX ;Abort?
JZ wrmst ;
RET
;------------------
;Console Output
outt:
PUSH PSW
CALL outstat
POP PSW
OUT TTO ;Send Data
RET
;------------------
;Check Console Input Status
instat:
IN TTS
ANI TTYDA
JZ instat
RET
;------------------
;Check Console Output Status
outstat:
IN TTS ;CHECK FOR USER INPUT CTRL-X
ANI TTYDA ;
JZ out2 ;
IN TTI ;
ANI DEL ;
CPI CTRX ;
JZ wrmst ;
out2: IN TTS ;Check Console Output Statuas
ANI TTYTR ;
JZ outstat ;
RET
;-------------------
; Debug Routine
; displays contents of reg A on LEDs
; and waits for 01H on toggles to continue
;debug:
;
; PUSH PSW ;save A
; CALL ledout
;dbg1: ; must see a transition from 00H to 01H on toggles
; IN 0FFH ;
; CPI 00H ;
; JNZ dbg1 ;
;dbg2: ;
; IN 0FFH ;
; CPI 01H ;
; JNZ dbg2 ;
;
; POP PSW ;restore A
; RET
;============================
; BDOS Emulator Routines
; Input: Reg C function code
;============================
lbdos: ; entry point
LXI H,0 ; save user's stack
DAD SP ;
SHLD oldstk ;
LXI SP, STACK ; setup new stack for bdos use
MOV A,C
;CALL ledout ;show BDOS fn number on LEDs
;**** ANALYSIS CODE - DISPLAYS BDOS FN# REQUESTED BY CALLING PROGRAM
;PUSH A
;CALL ilprt
;DB CR,LF,'IN BDOS FN# ',00H
;CALL outhex
;POP A
;****
CPI 00h
JZ wrmst
CPI 01h
JZ conin
CPI 02h
JZ conout
CPI 09h
JZ prstr
CPI 0Bh
JZ bconst
xbdos: ; exit point
LHLD oldstk ; restore user's stack
SPHL ;
RET ; return to calling program
;-----------------------
; BDOS Main Functions begin here
;-----------------------
; BDOS 01H - Console Input
conin:
CALL bdinst
IN TTI
JMP xbdos
;-----------------------
; BDOS 02H - Console Output
conout:
MOV A,E
cout: PUSH PSW
CALL bdoutst
POP PSW
OUT TTO ;Send Data
JMP xbdos
;-----------------------
; BDOS 09H - Print String
; POINTER TO STRING ARRIVES IN DE
; STRING IS TERMINATED WITH '$'
prstr:
PUSH D ;SAVE DE
XCHG ;SWAP DE WITH HL
PUSH H
FN9L:
MOV A,M ; cant use LDA M
CPI '$' ; IS IT A DOLLAR SIGN?
JZ FN9E ; YES - BRANCH TO END
PUSH PSW
CALL bdoutst
POP PSW
OUT TTO ;Send Data
POP H ;
INX H ; must save H for next loop, it gets trashed in bdos??
PUSH H ;
JMP FN9L ; LOOP BACK TO PROCESS NEXT CHAR
FN9E:
POP H
XCHG
POP D
JMP xbdos
;-----------------------
; BDOS 0BH - Get Console Status
bconst:
IN TTS
ANI TTYDA
JMP xbdos
;------------------
;------------------
ledout: ;Display Register A on front panel LEDs
CMA
OUT LEDS
CMA
RET
;------------------
;------------------
; BDOS Subroutines begin here
;------------------
;------------------
;Check Console Input Status
bdinst:
IN TTS
ANI TTYDA
JZ bdinst
RET
;------------------
;Check Console Output Status
bdoutst:
IN TTS ;CHECK FOR USER INPUT CTRL-X
ANI TTYDA ;
JZ bdout2 ;
IN TTI ;
ANI DEL ;
CPI CTRX ;
RZ ;
bdout2: IN TTS ;Check Console Output Statuas
ANI TTYTR ;
JZ bdoutst ;
RET
;-----------
Hi John,I have one of Mike's FDC+ cards in my Altair 8800B which uses the turnkey card with a 2SIO type Altair serial.
It works with an original MITS 8" drive as well as a little laptop I have nearby to act as a server if I need more drives.
The Disk Server is very smooth and easy to use, but it was designed for the FDC+ card.
Getting the software to work with the Compupro card would be an interesting project
And IIRC, IMSAI BASIC was written to use the IMSAI serial cards. Are you patching it to work with the Compupro card?
The key to using the different BASICS is getting the I/O correct. Each serial card may use a different UART chip.
Each chip is configured for different ports and control codes - like to check if data is available.
This is the reason why Altair Basic won't run on a stock IMSAI. Then CP/M came along and virtualized the interface.
One interface with CP/M then the hardware specific BIOS underneath.
On the CP/M emulator I use, it is basically a BIOS that sits in the correct location that CP/M expects.
When it gets a call from a CP/M application (like MBASIC) it then sends out the appropriate codes for the IMSAI I/O board I have installed.
You could do the same simply by replacing the IMSAI codes with your Compupro ones.
It seems you could pull one of your RAM chips and replace it with a 2716 programmed with a CP/M emulator pretty easily.
-J
;----------------------
help:
CALL ilprt
db lf,cr
db 'IMSAI 8080 Monitor 7.2 Commands:',lf,cr
db '----------------------------------------------------------------',lf,cr
db ' Dxxxx yyyy - Dump memory x to y',lf,cr
db ' Exxxx - Enter data at address x',lf,cr
db ' Bxxxx yyyy zzzz - Block move x-y to z',lf,cr
db ' Fxxxx yyyy bb - Fill memory x-y with byte b',lf,cr
; db ' K - Display Stack Pointer',lf,cr
db ' Mxxxx yyyy - Memory Test x-y',lf,cr
db ' Vxxxx yyyy zzzz - Verify memory block x-y with block z',lf,cr
db ' Cxxxx - Call subroutine at x',lf,cr
db ' Jxxxx - Jump to x',lf,cr
db ' R - Run CPM Program @0100h',lf,cr
db ' TExxxx - Text entry at x',lf,cr
db ' TDxxxx yyyy - Text dump from x-y',lf,cr
db ' S - Serial port SIO channel B',lf,cr
db ' Xxxxx - XMODEM File Receive to memory at x',lf,cr
db ' Pxxxx - Program EPROM @F000h with 1K block from x',lf,cr
db ' LL - Load from Library Card to RAM',lf,cr
db ' LS - Save from RAM to Library Card',lf,cr
db ' LE - Erase Sector on Library Card',lf,cr
db ' LR - Run a program from Library Card',lf,cr
db ' ? - This help screen',lf,cr
db 00h
JMP wrmst
;----------------------
Is it possible to kill some klingons on a BASIC-52?
I can try porting it.Never seen one. But it should be possible.
Maybe you can port the one written for Tiny Basic?
-J