home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Oakland CPM Archive
/
oakcpm.iso
/
cpmug
/
cpmug002.ark
/
LLLMON.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-04-29
|
2KB
|
92 lines
;SMALL MONITOR TO INTERFACE LLLBASIC AND LLLFP TO
;CP/M. A.R.G 10/9/77
;
CPM EQU 5 ;CP/M ENTRY
ORIGIN EQU 100H ;NEED NAME FOR SP
CONIN EQU 404Q ;LLL JUMP
CONOUT EQU 407Q ;LLL JUMP
STATUS EQU 412Q ;LLL JUMP
HSRDR EQU 415Q ;LLL JUMP
MEMST EQU 2000Q ;BOTTOM OF I/O BUFFER
M1 EQU 8000H ;INTERPRETER ORG.
M1A EQU 80013 ;INTERPRETER RESTART
;
ORG ORIGIN
JMP START
;
;************************************************************
;LLL JUMP VECTORS TO CP/M CALLS
ORG CONIN
JMP CIN
;
ORG CONOUT
JMP COUT
;
ORG STATUS
JMP STAT
;
ORG HSRDR
JMP RDR
;
;************************************************************
;PUT SP ADDRESS AT 100H. USE SPACE BELOW I/O BUFFER
START: LXI H,ORIGIN
SHLD MEMST-2
JMP M1 ;LLL INITIALIZE ENTRY POINT
;CAN USE M1A FOR RE-ENTRY TO
;OLD PROGRAM
;************************************************************
;CP/M ENTRY ROUTINES
;
;CIN RETURNS CHARACTER WITH HIGH BIT SET
;IN B REGISTER. LLLFP SAVES B&C
CIN: PUSH PSW
PUSH H
PUSH D
MVI C,1
CALL CPM
ORI 80H
POP D
POP H
MOV B,A
POP PSW
RET
;
;COUT ACCEPTS CHARACTER IN A
COUT: PUSH H
PUSH D
PUSH B
ANI 7FH
MOV E,A
MVI C,2
CALL CPM
POP B
POP D
POP H
RET
;
;STAT CHECKS LEAST SIGN. BIT OF A, SAME CONVENTION
;AS CP/M
STAT: PUSH H
PUSH D
PUSH B
MVI C,11
CALL CPM
POP B
POP D
POP H
RET
;
;A.R.G. DOES'T HAVE A READER, SO NO CHECKS MADE
RDR: PUSH H
PUSH D
PUSH B
MVI C,3
CALL CPM
POP B
POP D
POP H
RET
;