home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
SIMTEL
/
CPMUG
/
CPMUG036.ARK
/
PEN-CPM.ASM
< prev
next >
Wrap
Assembly Source File
|
1984-04-29
|
2KB
|
72 lines
;
;
;* - - - - - - - - - - - - - - - - - - - - - *
;* *
;* - PEN-CPM - *
;* *
;* ROUTINE TO TRANSLATE ELECTRIC PENCIL *
;* FILES TO CP/M FORMAT *
;* (C) COPYRIGHT 1979 *
;* ROD HALLEN BOX 73 TOMBSTONE, AZ 85638 *
;* 26 JULY 1979 *
;* THIS PROGRAM MAY BE USED FREELY BY *
;* COMPUTER HOBBYISTS FOR NON-COMMERCIAL *
;* APPLICATIONS. IT MAY NOT BE USED FOR *
;* COMMERCIAL PURPOSES OR SOLD WITHOUT *
;* WRITTEN PERMISSION OF THE AUTHOR. *
;* *
;* ASSEMBLE WITH DIGITAL RESEARCH "MAC" *
;* ASSEMBLER AND SEQIO LIBRARY. COMMAND *
;* FORMAT IS "PEN-CPM X.PCL Y.Z" *
;* OUTPUT FILE WILL BE "Y.Z". *
;* *
;* - - - - - - - - - - - - - - - - - - - - - *
;
;
;
ORG 100H
;
MACLIB SEQIO ;SEQUENTIAL I/O LIBRARY
;
LXI H,0 ;SAVE OLD SP
DAD SP ;AND SET UP NEW SP
SHLD OLDSP
LXI SP,NEWSP
;
FILE INFILE,INF,,1,,1024 ;SETUP PENCIL INPUT FILE
;
FILE OUTFILE,OUTF,,2,,1024 ;SETUP CPM OUTPUT FILE
;
MESS MES1 ;PRINT ACTIVITY MESSAGE
;
PENCP GET INF ;GET CHAR FROM INPUT FILE
CPI 0 ;PENCIL END OF FILE ?
JZ DONE ;IF SO, TIME TO EXIT
CPI 0DH ;IS IT END OF LINE ?
CALL OUTPT ;SEND IT TO OUTPUT FILE
JNZ PENCP ;IF NOT EOL, SKIP LINE FEED
MVI A,0AH ;LOAD LINE FEED
CALL OUTPT ;SEND IT
JMP PENCP ;NEXT CHARACTER
;
DONE MESS MES2 ;PRINT COMPLETION MESSAGE
FINIS OUTF ;CLOSE OUTPUT FILE
LHLD OLDSP ;GET OLD STACK POINTER
SPHL ;AND RESTORE IT
RET ;RETURN TO CPM
;
OUTPT PUT OUTF ;SEND CHAR TO OUTPUT FILE
RET
;
OLDSP DS 2 ;STORAGE FOR OLD STACK POINTER
DS 40H ;NEW STACK LOCATION
NEWSP ;NEW STACK POINTER
;
MES1 DB CR,LF,'CONVERTING ELECTRIC PENCIL FILE TO '
DB 'CP/M FORMAT . . . . .',CR,CR,LF,'$'
MES2 DB CR,LF,'<--- CONVERSION COMPLETE --->',CR,LF,'$'
;
BUFFERS
;
END