IMD 1.16: 31/05/2007 19:51:28 FOGCPM.103 --FOGCPM103CPMDEC FTN -07-00 86 CPMDEC DOCCTERM COM@CTERM DOCCTERM C 1 !"#$%DATE COM&DATE MACd'()*+,-./0123DATE2 COM4DATE2 MACU56789:;<=>?DATE DOCX@ABCDEFGHIJEPOSLNK COMKLMEPOSLINKDOC NOGD COM?PQRSTUVWGD PASXNEWROM COMYZ[\]^_`abcdefghNEWROM COM+ijklmn-CPM103 DOC NEWROM DOCoOREMOTE AQMCpqrstuvwxOSBDSCIOC ,yz{|}~OS-CIO OSBOSMDIO C OSBLINK MACOZZYBAUDCOMOZZYBAUDC OZZYTIMECOM$ROMDUMP COMROMDUMP MACSCPRT2 COMSCPRT2 MACOZSTUF DOCTERMNL2 ASMLTERMNL2 DOCTOGGLE ASMThis is the disk name. C C FILE TRANSFER PROGRAM FROM CP/M TO RSX AND BACK USING XMODEM TYPE C PROTOCOL. FOR TEXT FILES ONLY @ THIS TIME. C THIS FORTRAN PROGRAM WAS SLEAZED TOGETHER BY: C JEFF BERGER 6/15/83 OF BATTLE CREEK, MI. C C Program works well with standard source files. C Remember, the data goes thru the RSX Full Duplex Terminal Driver C and as much as I tweak it with the SMC QIO there are still some C binary codes it can not tolerate. If you must send a .COM file C to your RSX system (ie. you have a CP/M emulator like the BRIDGE) C use the UNLOAD program and ship the .HEX file over. This holds true C back to your CP/M system also. If somebody would like to write a C routine using the WRITE$ macro for RSX binary disk block writes C this would clean up some of these problems (just make sure there C is nothing of any value on your RSX disk durring developement !!) C C The obvious problem now is how to get this source code to your DEC C (or somebody elses DEC what ever the case may be) so you can compile C task build and run this program. I would suggest a single character/ C wait for echo transmition to EDT, EDI or PIP (some comm programs C have this facility such as MICRO-LINK ect.) Remember this method has no C error detection so if you have bad phone line you will have to do some C clean up. Direct connect if possible. If you do not have this type of C program available, please let me know via this board and it's just C a matter of finding the two that I coded for this purpose in June. C C 1. Load this source to the RSX system. C 2. Compile and task build (TKB WITH MAXBUF = 255). C 3. Run your CP/M modem program in terminal mode. C 4. Run this program and follow directions C C !!! NO CRC !!! C C BYTE ANS C WRITE(5,100) 100 FORMAT(//' 1. DEC receive - CP/M send', +/,' 2. CP/M receive - DEC send',/,' 3. EXIT',//, +'$ENTER OPTION:') READ(5,110)ANS 110 FORMAT(1A1) C IF(ANS.EQ.'1')CALL TODEC IF(ANS.EQ.'2')CALL TOCPM IF(ANS.EQ.'3')CALL EXIT C STOP END C**************************************************************** C C SUBROUTINE TOCPM: DEC SEND - CP/M RECEIVE. C C*************************************************************** C SUBROUTINE TOCPM C BYTE RBUFF(128) !REC READ FROM SOURCE FILE. BYTE SBUFF(132) !RECORD SENT TO MICRO. BYTE FNAME(30) !FILE NAME. BYTE BLOCK !BLOCK NUMBER. BYTE NAK BYTE SMC(8) !SET MULTIPLE CHARACTERISTICS. BYTE VT100(2) !SET BACK TO VT100. C INTEGER TEMP1 !TEMP STORSGE. INTEGER TOTAL !NUM OF BYTES IN SREC. INTEGER N !NUM OF CHARS READ FROM DEC FILE. INTEGER REMAIN !REMAINING BYTES IN BUFFER. INTEGER IP(6) !PARAMATER BLOCK FOR QIO. INTEGER EOF !IF = 1 THEN EOF. C EOF = 0 TEMP1=0 TOTAL=0 BLOCK=0 C DO 50 I=1,30 50 FNAME(I)=0 C WRITE(5,100) 100 FORMAT(//,'$ENTER SOURCE FILE NAME:') READ(5,110)FNAME 110 FORMAT(30A1) C OPEN(UNIT=1,NAME=FNAME,TYPE='OLD',ERR=999) C********************************************************** C TRY SET /RPA=TI: INSTEAD OF THE REST OF THIS !!! * C THAT IS SMC(1)="65 , SMC(2)=1 * C********************************************************** SMC(1)="12 !SET TO SMC(2)= 0 !NO CRT. SMC(3)="10 !TERMINAL TYPE, SMC(4)= 0 !UNKNOWN. SMC(5)="17 !HARDWARE FORMFEED, SMC(6)= 1 !YES. SMC(7)= 1 !BUFFER SIZE, SMC(8)="377 !255. C C*** SMC(1)="65 C*** SMC(2)=1 CALL GETADR(IP(1),SMC(1)) IP(2)=8 CALL WTQIO("2440,5,1,,,IP) C WRITE(5,40) 40 FORMAT(/,/,' WAITING FOR INITIAL "NAK" FROM RECEIVER.') C IP(2)=1 !LENGTH OF QIO READ. CALL GETADR(IP(1),NAK) !ADDRESS OF QIO READ BUFFER. 113 CALL WTQIO("1030,5,1,,,IP) !QIO READ PASS ALL BITS DO NOT ECHO. C !WAITS FOR C !10 SEC TIMEOUT AND NAK FROM RECEIVER. IF(NAK.NE."25)GO TO 113 !IF NOT NAK TRY AGAIN. C 115 READ(1,120,END=3000)N,RBUFF 120 FORMAT(Q,128A1) C RBUFF(N+1)="15 !ADD CR-LF FOR CP/M. RBUFF(N+2)="12 N=N+2 C TEMP1=TOTAL !TEMP STORAGE OF TOTAL. TOTAL=TOTAL+N C IF(TOTAL.GE.128)GO TO 1000 !HANDLE CROSSING CP/M BLOCKS. C DO 500 I=1,N SBUFF(I+3+TEMP1)=RBUFF(I) ! 500 CONTINUE C GO TO 115 !READ ANOTHER RECORD. C 1000 REMAIN=128-TEMP1 DO 1100 I=1,REMAIN SBUFF(I+3+TEMP1)=RBUFF(I) !PUT FIRST PORTION OF REC INTO SBUFF. 1100 CONTINUE C BLOCK=BLOCK+1 !INC BLOCK. CALL SEND(SBUFF,BLOCK,EOF) !SEND TO MICRO. C DO 2000 I=1,N-REMAIN !PUT THE REST OF THE REC IN NEXT SBUFF. SBUFF(I+3)=RBUFF(I+REMAIN) 2000 CONTINUE C TOTAL=N-REMAIN C GO TO 115 !READ NEXT REC. C 3000 DO 3100 I=TOTAL+4,131 SBUFF(I)="32 !CP/M EOF. 3100 CONTINUE BLOCK=BLOCK+1 CALL SEND(SBUFF,BLOCK,EOF) EOF=1 CALL SEND(SBUFF,BLOCK,EOF) !TELL SEND TO SEND EOT. C 999 CONTINUE 6000 CONTINUE C SMC(1)="10 !TERMINAL TYPE SMC(2)="15 !IS VT100. CALL GETADR(IP(1),SMC(1)) ! IP(2)=2 ! CALL WTQIO("2440,5,1,,,IP) !SET /VT100=TI: C RETURN END C**************************************************************************** C C SUBROUTINE SEND: SENDS DATA TO MICRO W/ PROTOCOL USING QIO READ C WITH PROMPT. LOOKING FOR ACK OR NAK. C C*************************************************************************** C SUBROUTINE SEND(SBUFF,BLOCK,EOF) C INTEGER ISTAT(2) !STATUS BLOCK FOR QIO. INTEGER IPARAM(6) !PARAMETER BLOCK FOR QIO. INTEGER FLAG1,FLAG2 !EVENT FLAGS. INTEGER EOF C BYTE BLOCK !BLOCK NUMBER OF TRANSFER. BYTE SBUFF(132) !SEND BUFFER. BYTE ACKNAK !QIO READ BUFFER (ACK OR NAK). C DATA IFUN/"4430/ !QIO READ(NO ECHO) W/ PROMPT C !PASS ALL BITS. DATA ILUN/5/ !LOGICAL UNIT NUMBER. DATA FLAG1/1/ !EVENT FLAG NUMBER. DATA FLAG2/2/ !ANOTHER EVENT FLAG NUMBER. C SBUFF(132)=0 !RESET CHECKSUM. C SBUFF(1)=1 !ASCII SOH IF (EOF.EQ.1)SBUFF(1)=4 !EOT. SBUFF(2)=BLOCK !BLOCK NUMBER. SBUFF(3)=255-BLOCK !BLOCK CHECK CHARACTER. C DO 100 I=4,131 !CALCULATE CHECKSUM SBUFF(132)=SBUFF(132)+SBUFF(I) 100 CONTINUE C IPARAM(2)=1 !LENGTH OF QIO READ BUFFER. IPARAM(5)=132 !LENGTH OF PROMPT BUFFER (WRITE DATA). IF(EOF.EQ.1)IPARAM(5)=1 !JUST SEND ONE CHAR (EOT) AT EOF. CALL GETADR(IPARAM(1),ACKNAK) !ADDRESS OF READ BUFFER. CALL GETADR(IPARAM(4),SBUFF(1)) !ADDRESS OF PROMPT (WRITE) BUFFER. C C************************************** C WRITE(5,101)SBUFF(1),SBUFF(2),SBUFF(3),SBUFF(132) 101 FORMAT(' ',4(O6)) C************************************** 200 CALL MARK(FLAG2,10,2) !MARK TIME FOR 10 SECS. C CALL QIO(IFUN,ILUN,FLAG1,,ISTST,IPARAM) !READ W/ PROMPT. C !PROMPT IS THE 128 BYTES DATA . CALL WFLOR(FLAG1,FLAG2) !WAIT FOR FIRST FLAG (QIO OR TIMEOUT). CALL CANMT(FLAG2) !CANCEL MARK TIME. CALL WTQIO("12,ILUN,3,,,,) !CANCEL QIO READ W/ PROMPT. CALL READEF(FLAG2,IDS) !READ EVENT FLAG STATUS. C C*** WRITE(5,10)IDS 10 FORMAT(' IDS = ',I2) IF(IDS.EQ.2)GO TO 200 !TIMEOUT !! RETRY. C C*** WRITE(5,11)ACKNAK 11 FORMAT(' ACKNAK = ',O6) IF(ACKNAK.EQ.6) RETURN !ACK !! GO GET ANOTHER RECORD C GO TO 200 !NAK !! RETRY. C END C**************************************************************** C C SUBROUTINE TODEC: DEC RECEIVE - CP/M SEND. C C*************************************************************** C SUBROUTINE TODEC C BYTE BIGBUF(256,128) !FILE BUFFER (32K). BYTE RBUFF(132) !RECORD RECEIVED FROM MICRO. BYTE FNAME(30) !FILE NAME. BYTE BLOCK !BLOCK NUMBER. BYTE ACKNAK BYTE SMC(10) !SET MULTIPLE CHARACTERISTICS. BYTE SMC2(4) BYTE VT100(2) !SET BACK TO VT100. BYTE CHKSUM !CHECK SUM BYTE. BYTE ACK,NAK,EOT,CR,LF,EOF BYTE TBUFF !SINGLE CHAR TEMP BUFF. C INTEGER IPARAM(6) !PARAMATER BLOCK FOR QIO. INTEGER IP(6) !"" INTEGER ERRLIM !ALLOWABLE NUMBER OF ERRORS. INTEGER FLAG1 !EVENT FLAG. INTEGER FLAG2 !"" INTEGER COUNT !TEMP COUNTER. INTEGER ISTST(2) !QIO IO STATUS. INTEGER IOSTAT(2) ! C COMMON /BLOCK1/BIGBUF C DATA FLAG1/1/ DATA FLAG2/2/ DATA NAK/"025/ !ASCII NAK. DATA ACK/"006/  !ASCII ACK. DATA EOT/"004/ !ASCII END OF TRANSMISSION. DATA EOF/"032/ !CP/M END OF FILE. DATA CR/"15/ !ASCII CARRIAGE RETURN. DATA LF/"12/ !ASCII LINE FEED. DATA ILUN/5/ !LOGICAL UNIT NUMBER. DATA IFUN/"4430/ !QIO READ W/ PROMOT, PASS ALL BITS, C !NO ECHO. C ERRLIM = 10 !SET NUMBER OF ERRORS ALLOWED. BLOCK=0 !INITIALIZE. C DO 50 I=1,30 50 FNAME(I)=0 C WRITE(5,100) 100 FORMAT(//,'$ENTER DESTINATION FILE NAME:') READ(5,110)FNAME 110 FORMAT(30A1) C OPEN(UNIT=1,NAME=FNAME,TYPE='NEW',CARRIAGECONTROL='LIST', +ERR=999,RECL=255) C write (5,102) 102 format(' OK... WAITING FOR DATA.') C SMC(1)="12 !SET TO SMC(2)= 0 !NO CRT. SMC(3)="10 !TERMINAL TYPE, SMC(4)= 0 !UNKNOWN. SMC(5)="17 !HARDWARE FORMFEED, SMC(6)= 1 !YES. SMC(7)= 1 !BUFFER SIZE, SMC(8)="377 !255. SMC(9)="50 !SLAVE, SMC(10)=1 !YES. C C CALL GETADR(IPARAM(1),SMC(1)) IPARAM(2)=10 !SEND 10 CHARACTERS. CALL WTQIO("2440,5,1,,,IPARAM) !SET MULTIPLE TERMINAL C !CHARACTERISTICS. C IPARAM(2)=132 !LENGTH OF QIO READ BUFFER. IPARAM(5)=1 !LENGTH OF PROMPT BUFFER (ACK OA NAK). C CALL GETADR(IPARAM(1),RBUFF(1))!ADDRESS OF READ BUFFER. CALL GETADR(IPARAM(4),ACKNAK) !ADDRESS OF PROMPT BUFFER. C C ACKNAK = NAK !FIRST TIME PROMPT W/ NAK. C 200 CALL MARK(FLAG2,4,2) !MARK TIME FOR 4 SECS. C CALL QIO(IFUN,ILUN,FLAG1,,ISTST,IPARAM) !READ W/ PROMPT. C !PROMPT IS ACK OR NAK . CALL WFLOR(FLAG1,FLAG2) !WAIT FOR FIRST FLAG (QIO OR TIMEOUT). CALL CANMT(FLAG2) !CANCEL MARK TIME. CALL WTQIO("12,ILUN,3,,,,) !CANCEL QIO READ W/ PROMPT. CALL READEF(FLAG2,IDS) !READ EVENT FLAG STATUS. C C IF(IDS.NE.2)GO TO 300 !NOT TIMEOUT, CONTINUE. IF(RBUFF(1).EQ.EOT)GO TO 900 !END OF TRANSMISSION.(YES ! THIS C !CHARACTER WILL BE IN THE QIO BUFFER.) NAKNUM = NAKNUM + 1 !INCREMENT NAK COUNT. IF (NAKNUM .GE. ERRLIM)GO TO 999 !IF TOO LARGE, EXIT. ACKNAK = NAK !SET PROMPT TO NAK AND GO TO 200 !TRY AGAIN. C 300 CHKSUM = 0 !ZERO CHECKSUM. DO 400 I=4,131 !CALCULATE CHECKSUM. CHKSUM=CHKSUM+RBUFF(I) ! 400 CONTINUE ! C IF(CHKSUM.EQ.RBUFF(132))GO TO 500 !IF GOOD CHECKSUM, CONTINUE. NAKNUM = NAKNUM + 1 !INC ERROR COUNT. IF(NAKNUM .GE. ERRLIM)GO TO 999!IF TOO LARGE EXIT. ACKNAK = NAK !ELSE TRY AGAIN. GO TO 200 C 500 BLOCK = BLOCK + 1 ! IF (BLOCK.EQ.RBUFF(2))GO TO 600 !IF GOOD BLOCKNUMBER, CONTINUE. NAKNUM = NAKNUM +1 !ELSE INC ERROR COUNT. BLOCK = BLOCK - 1 ! IF(NAKNUM .GE. ERRLIM)GO TO 999!IF TOO LARGE, EXIT. ACKNAK = NAK !ELSE TRY AGAIN. GO TO 200 ! C 600 COUNT = BLOCK IF(BLOCK .EQ. 0)COUNT = 256 !BLOCK WRAPS TO 0, NOT 1 ! DO 650 I = 1,128 BIGBUF(COUNT,I) = RBUFF(I+3) !STUFF DATA INTO BLOCKBUFFER. 650 CONTINUE IF(COUNT.EQ.256)CALL WRITE !WHEN BIGBUF IS FULL WRITE IT TO DISK. C NAKNUM = 0 !RESET ERROR COUNT. ACKNAK = ACK !PROMPT W/ ACK. GO TO 200 !GET ANOTHER BLOCK FROM THE MICRO. C C 900 CALL GETADR(IP(1),ACK) !ADDRESS OF WRITE BUFFER. IP(2)=1 !LENGTH OF WRITE BUFFER. CALL WTQIO("410,ILUN,1,,,IP) !WRITE FINAL ACK. C CALL WRITE !WRITE FINAL BLOCK. C C999 WRITE(5,777)NAKNUM C777 FORMAT(' *** ',I2) 999 CLOSE(UNIT = 1) C SMC2(1)="10 !TERMINAL TYPE SMC2(2)="15 !IS VT100. SMC2(3)="50 !SLAVE, SMC2(4)=0 !NO. C CALL GETADR(IP(1),SMC2(1)) ! IP(2)=4 !SEND 4 CHARACTERS. CALL WTQIO("2440,5,1,,IOSTAT,IP,IDS) !SET /VT100=TI: C WRITE(5,2000)IOSTAT(1),IOSTAT(2),IDS C2000 FORMAT(' ',3O6) C CALL EXIT END C C*********************************************************************  C C SUBROUTINE WRITE: WRITES TO DEC DISK. C C********************************************************************* C SUBROUTINE WRITE C BYTE BIGBUF(256,128) BYTE WBUFF(255) BYTE CR,LF,EOF C COMMON/BLOCK1/BIGBUF C DATA CR/"15/ DATA LF/"12/ DATA EOF/"32/ C K=0 DO 920 I = 1,256 DO 930 J = 1,128 IF(BIGBUF(I,J).EQ.CR)GO TO 915 !CP/M END OF RECORD. IF(BIGBUF(I,J).EQ.EOF)GO TO 940 !LOOK OUT FOR CP/M END OF FILE. IF(BIGBUF(I,J).EQ.LF)GO TO 930 !IGNORE LINE FEEDS. K=K+1 C*** IF(K.EQ.256)GO TO 915 !WATCH OUT FOR BIG RECORD. C*** WBUFF(K)=BIGBUF(I,J) GO TO 930 C915*** IF(K.EQ.0)K=1 915 WRITE(1,918)(WBUFF(L),L=1,K) !WRITE RECORD TO DISK. 918 FORMAT(255A1) K=0 !RESET COUNT AFTER WRITE. 930 CONTINUE 920 CONTINUE C 940 RETURN END CPMDEC is a FORTRAN program for use on a DEC PDP computer running RSX. It will transfer a text file using the MODEM7 protocol with 8-bit checksum verification. Thanks to Bryan Stallard for categorizing this file. *K͞+Ae_'+FÎr ͖ 8{ Ăw#w#w^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2qZZk:q|/g}/o#|/g}/o#:q<2qqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2qZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! !9~#A"s!`*"!"!Y">2>2>22!"!"!@"!" ʞ!F#x±~#±!b2r~# "2r+}|~#G:rx"2r+w# +6#!6#2w2x*s!>r<o&F=-` r'~h6!+`W?_!~7z?` :>ª@w#G.¶ww#?*>?w#> w#.7:77!a{   `OE!y6$ -7rBo&))T])))!yV5:=b#:=#:$=2#v+:<"(">6͋5:&=͋5#*&=|"M1Ϳ5#>6͋5:&=͋5>#͋5>6͋5:'=͋5#*&="<(#>͋5:&=͋5>s͋5>@2=#R1Ϳ5#(,#:==2=)(@#>s͋5#͘(Y#X1:>͋5:&=͋5c1Ϳ5#f1Ϳ52=#(—#>͋5:&=͋5>{͋5c1Ϳ5#(#:$=µ#>}͋5c1Ú#:$=;-͘(#>&͋5͋5f2Ú#:$=$v+è":=$,v+2#:$=>$$>͋5v+>͋5>@2$=2#*="<1Ϳ5:=2="<|s$}d$[2Ϳ5z$g$[3Ϳ5>G>)͋5$#͞*D)͏,Ͷ,v++4ʱ$m5 W È & < ] '@!9DM!\ ! ͡! ! ͡! ! ͤ͡! ! ͡! !0 ͡!4 !K ͡!O ! ͡! ! ͡! ! ͡! !1 ͡*Yw#w*[w#w*]6#6}ͧ|ͪ`isMY|M[M]¸ͭMY|͝*Ys#r*[^#Vr+s*Y`ins`in&|g}oͰͳ|E Ͷ|g}o! s! n}' ' ' ' ' 6 ! n&͹E ! n&ͼE ! n}qͿ!9Configurable Terminal Program, v2.0%s (c) 1981 by Joe Felsenstein%s OK to copy for nonprofit purposes%s Commands: (^ indicates these are control characters) %s ^D Dump contents of buffer to modem%s ^E Exit to CP/M%s ^F Fill buffer from CP/M file (asks for name)%s ^R toggles filling of buffer from modem port%s ^W Writes buffer to CP/M file (asks for name)%s Now you are a terminal (control-E to stop being one)...%s J mCÛxÖá!9DM! ! 8 ; `is`in&> Y͝*s#r!!!!!pA `is!G |g}o|g}o!D !9Want terminal to be half-duplex? (Y or N) %s  x!9DM!!!!!@ `is#r͐|g}o|H !N N !N !9] è!9DM!!Z `is#r͐ !9Î m! !!!! ͋ ! ! ͋ BUFFER FULL! %c%c%c%sBUFFER FILLING TURNED OFF!%s è!9DM!! *##sw}& `i6#6, `iw#w͐3 !9!9DMw`is`in&T !9Ä mC'&ûÈ 8Ð!9DM! n}ʮ ʾ!!` ! !` c ! s!` ! n}Y͝! n}y͝|g}o|! 6#6! w#w! w#w`i6#6͐M[ڮ͐*Yn! s! n} e͐|e͐|eq! n&f \|†! n&i ͐|ʢ! n} ͝! s#r`i^#Vr+s!!G` !K!q` * l *###* o `is#r*[w#w͐#|"* !t!` *###r ! s`is#6͐#|ʲ! n}ʲ*[^#Vr+s*Y! ns! n&i *###r ! s`is#6M[M]¯u `i6#69*###x !!` MY|͝*Ys#rMY|*[w#w!!` * l *###* { `is#r͐#|`i6#6͐M[ڌ͐*Yn! si *###! n&~ `i^#Vr+s?*###!~ *###́ *###x !!` * !! ` !9Want to change to <CR>? %s(type Y or N)%s ------ FINISHED TRANSMITTING BUFFER -----%s name of file to read from your disk? %sCan't find file:%s %s ------- FINISHED READING FILE --------%s name of file to write on your disk:%s ---------- FILE WRITTEN ------------%s ERROR IN CREATING FILE:%s %s 0è&!9DM! n&!*`is#r\|d! n&-!9vÉ!y9DM! `ip`is!9áû!9DM! n&͞|! n&! n&!9DM͐!͐s#rz!͐##w#w͐~#fo%Cè,!9DM͐|<͐+++|S!͐##^#Vr+sz}͐^#Vr+sn&!͐͐~#fo"`is#r!ں͐##^#Vr+s͐##͐?+s#r͐͐s#r͐^#Vr+sn&!9 â!9DM͐'!͐~#fo >å!9DM͐͐;s#rzc!͐͐s#r͐##6#6͐~#foÜè!9DM͐+|¼! n&͓͐++|! n&!͖͐+++|! n&!͖͐++++|1! n} ! !͖! n&!͖͐##^#Vr+szb͐^#Vr+s! ns&!͐͐~#fo͙ʌ!͐##6#6͐͐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2:*2@>2:@o "I !" :1 R O*UR X* G:xl :  *̩ : l x͖ *#"EH DH 0:~ ! ^4! w͆ Æ *! 6z͖ {͖ 4>R>V>D >P >L >NCONSTLOC CTERM EXPLANATION copyright (c) by Joe Felsenstein, 1982. It is OK to copy cterm and this text for nonprofit purposes. 1 CTER n longe assume tha th CP/ seria por i addresse RDR:=PTR: CTER take car o tha itself T boo CTERM al yo hav t d i typ CTERM carriag return answe ye o n t hal duplex an you'r off sta comman i n longe necessary. 2 Th bau rat fo CTER i determine b th syste SETU program whic ha th tw option o 30 bau an 120 baud Yo shoul chec t mak sur th bau rat i wha yo want 3 Th source-cod fil CTERM. i i BD C which run beautifull i Osborne-1's. 4 Thi versio i NO th ful Configurabl Termi na program bu instea th versio preconfigure fo the Osborne-1. 5 T ru th progra jus typ CTERM Answe th questio a t whethe yo wan hal o ful duplex Th rest is self-explanatory (more or less). 6 Onc i CTERM ^ permit yo t fil you buffer wit name fil yo have an ^ permit yo t dum you buffer content t th seria por fo transmis sion ^Ҡ permit yo t ope you buffe fo incomin data an ^ repeate wil clos you buffe (E.g i "toggles you buffer) ^ wil the permi yo t "write (e.g save th dat loade i you buffe afte ^Ҡ i use int fil name b you NOTE Whe ^ i used i start fillin fro th beginnin o th buffer causin los o al previou content o th buffer ^ wil permi yo t exi fro th termina progra int CP/ comman line 7 Al othe character type g ou th seria port Al character receive a tha por g ont th screen. 8 Buffe siz shoul b 32,00 character (NO 32K) Originall bu i th progra limite i t 8K bu thi ha bee repaired 9 Thi progra i full legal Owin t th wisdo a n public-spiritednes o B Software' Leo Zolman, the plac n restrictio o royaltie o distribution o compile code Pleas fee fre t distribut the cod t othe Osborn users Al as i that: a N on mak profi fro th distribution of this software. b. No one attempt to remove my name or copyright. Joe Felsenstein Seattle, 2/5/82 Document revised by D. Slaughter 5/4/82th beginnin o th buffer causin los o al previou content o th buffer ^ wil permi yo t exi fro th termina progra int CP/ comman line 7 Al othe character type g ou th seria port Al character receive a tha por g ont th screen. 8 Buffe siz shoul b 32,00 character (NO 32K) Originall bu i th progra limite i t 8K bu thi ha bee repaired 9 Thi progra i full legal Owin t th wisdo a/* Configurable Terminal Program, (c) 1981 by Joe Felsenstein */ /* OK to copy for nonprofit purposes */ /* This is the version preconfigured for the Osborne-1 */ #include "B:BDSCIO.H" #define TRUE 1 #define FALSE 0 #define BUFRSIZE 32000 #define CTRLD 4 #define CTRLE 5 #define CTRLF 6 #define CTRLG 7 #define LF 10 #define CR 13 #define CTRLR 18 #define CTRLW 23 #define CTRLZ 26 /* these following declarations declare the configuration parameters */ int halfduplex; char cpch; /* external storage location for CPM 2.x BDOS(6, ) calls */ char iobuf[BUFSIZ]; /* the IO buffer */ char filename[80]; /* room for a file name */ char buffer[BUFRSIZE]; /* the storage buffer */ int stash, buflong, bsize; modemrdy() { int cx; cx = call(0x4000, 0, 0, 0, 0); if ((cx & 0x01) != 0) return(TRUE); else return(FALSE); } modemread() { int x; x = bdos(3, 0); /* Osborne modem port is CP/M Reader device */ return (x); } keyrdy() { int x; cpch = bdos (6, 0xFF); if (cpch != 0) x = 1; else x = 0; return(x); } keyread() { char ch; ch = cpch; /* if keyrdy, char was stored in cpch */ return(ch); } modemsend(ch) char ch; { int cx; cx = bdos(5, ch); /* Osborne modem output is on CP/M list device */ if (halfduplex) putch(ch); } buferrmsg() { printf("%c%c%c%s", CTRLG, CTRLG, CTRLG, "BUFFER FULL! "); printf("%s\n", "BUFFER FILLING TURNED OFF!"); } docommand(ch) char ch; { int i, gotcr, striplf; char c; switch (ch) { case CTRLD : printf("%s", "Want to change to ? "); printf("%s\n","(type Y or N)"); c = getchar(); printf("\n"); if ((c=='Y') | (c=='y')) striplf = TRUE; else striplf = FALSE;  gotcr = FALSE; for (i = 1; i <= buflong; i++) { c = buffer[i]; if ( (c == LF) && gotcr && striplf ) ; else modemsend (c); if (!halfduplex) putch (c); if (striplf) gotcr = (c == CR); } printf("%s\n", "------ FINISHED TRANSMITTING BUFFER -----"); break; case CTRLE : break; case CTRLF : printf("%s", "name of file to read from your disk? "); gets(filename); i = fopen(filename, iobuf); buflong = 0; if (i == -1) printf("%s %s\n", "Can't find file:", filename); else { i = c = getc(iobuf); while ( (i != -1) && (c != CTRLZ) ) { buffer[++buflong] = c;  putch(c); i = c = getc(iobuf); if (buflong == bsize) { buferrmsg(); i = -1; } } fclose (iobuf); printf("%s\n", "------- FINISHED READING FILE --------"); } break; case CTRLR : stash = !stash; if (stash) buflong = 0; break; case CTRLW : printf("%s ", "name of file to write on your disk:"); gets(filename); i = fcreat(filename, iobuf); if (i != -1) { for (i = 1; i <= buflong; i++) { putch(c = buffer[i]); putc(c, iobuf); } putc(CTRLZ, iobuf); fflush(iobuf);   fclose(iobuf); printf("%s\n", "---------- FILE WRITTEN ------------"); } else printf("%s %s\n", "ERROR IN CREATING FILE:", filename); break; } } configure() { char c; int i; printf("\n%s\n", "Want terminal to be half-duplex? (Y or N)"); c = getchar(); halfduplex = (toupper(c) == 'Y'); c = call(0x1F70, 0, 0, 0, 0); /* move modem ready routine */ poke (0x0003, (peek(0x0003) & 0xF3) | 0x04); /* set IOBYTE */ } main () { char ch, kch; int x, i; printf("%s\n", "Configurable Terminal Program, v2.0"); printf("%s\n", "(c) 1981 by Joe Felsenstein"); printf("%s\n\n", "OK to copy for nonprofit purposes"); configure(); printf("\n%s\n", "Commands: (^ indicates these are control characters)"); printf("%s\n", " ^D Dump contents of buffer to modem"); printf("%s\n", " ^E Exit to CP/M"); printf("%s\n", " ^F Fill buffer from CP/M file (asks for name)"); printf("%s\n", " ^R toggles filling of buffer from modem port"); printf("%s\n", " ^W Writes buffer to CP/M file (asks for name)"); printf("%s\n", "Now you are a terminal (control-E to stop being one)..."); stash = FALSE; buflong = 0; bsize = BUFRSIZE; do { if (modemrdy()) { ch = modemread(); if (stash) { if (buflong == bsize) { buferrmsg(); stash = !stash; } else buffer[++buflong] = ch; } putch(ch & 0177); } if (keyrdy()) { kch = keyread() & 0177; /* automatically strip parity bit */ switch (kch) { case CTRLD : case CTRLE : case CTRLF : case CTRLR : case CTRLW : docommand(kch); break; default : modemsend(kch); break; } } } while ( kch != CTRLE); exit(); } f("%s\n", " ^W Writes buffer to CP/M file (asks for name)"); printf("%s\n", "Now you are a terminal (control-E to stop being one)..."); stash = FALSE; buflong = 0; bsize = BUFRSIZE; do { if (modemrdy()) { ch = modemread(); if (stash) { if (buflong == bsize) { buferrmsg(); stash = !stash; } else buffer[++buflong] = ch; } putch(ch & 0177); } if (keyrdy()) { kch = keyread() & 0177; /* automatically strip parity bit */ switch (kch) { case CTRLD : case CTRLE : case CTRLF : case CTRLR : case CTRLW : docommand(kch); break; default : modemsend(kch); br%DATE.COM by L. Dunbar, 05 Jan 19851:Y< M4~4ͪ2Rͪ0͡ 8͡2P=GO'' !eoSͪ0͡!:P=o8͡2Qa ͱ&;0g;0o  _*.|g"T!*.>w*.|w*(% 08:|'''G|'/Enter today's date (MM DD YY) ==> $$ Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec      OSHARDr  Apr  PAGE 56 TITLE DATE SUBTTL Version 2.3, 9 January 1985 ; Author: Larry Dunbar ; ; Purpose: DATE is designed to accept the month, day, and year ; numbers from the keyboard and place the data into ; locations 50h (month), 51h (day), and 52h (year). ; In addition, the month name is included beginning at ; location 53h. After the date information has been ; entered, a .COM file will be executed. ; ; Usage: Refer to documentation. ; ; ; ; Use Z80 op-codes .Z80 ; Equates RDCON EQU 1 ; BDOS read console function number. DIRIO EQU 6 ; BDOS direct console I/O function number. PRTSTR EQU 9 ; BDOS print string function number. BDOS EQU 5 ; BDOS vector address. BELL EQU 7 ; ASCII bell. BS EQU 8 ; ASCII backspace. CLS EQU 26 ; Osborne-1 clear screen code. MON EQU 50H ; Month location. DAY EQU   51H ; Day location. YEAR EQU 52H ; Year location. NAME EQU 53H ; Month name location. GOOD EQU 59H ; End of month name location. ASEG ORG 0100H DATE: JP START DB 'DATE.COM by L. Dunbar, 05 Jan 1985' ; Begin at this point. START: LD SP,STACK ; Set stack address. LD A,(GOOD) ; Fetch last month name data byte. CP 0 ; If the value is 0, then we can JP Z,BOOT ; assume that the date has already ; been entered. This is a poor ; check, but the best that can be ; done under the circumstances. LD DE,OPENMSG ; Display the opening message. LD C,PRTSTR CALL BDOS CALL GETMON ; Get and verify the month number. CALL PROMPT ; Prompt for day entry.  CALL GETDAY ; Get the day byte. CALL PROMPT ; Prompt for year entry. CALL GETDIGIT ; Get the year byte. LD (YEAR),A ; Store in the year location. JP BOOT ; Go execute the auto-boot code. ; GETMON - This subroutine inputs and verifies the user's entered ; month number. The month number must be between 1 and 12; if not, ; then the cursor backspaces over the incorrect entry and the user ; can re-enter the number. GETMON: CALL GETDIGIT ; Get the user's number entry (month). CP 1 ; Is it less than 1? JR NC,MON1 ; If not, go do next check. CALL FIX ; Else, backspace over the entry JR GETMON ; and try again. MON1: CP 13 ; Is the month number > 13? JR C,MON2 ; No, then jump to finish processing. CALL FIX ; Else, allow re-entry. JR GETMON MON2: LD  (MON),A ; Put month number in its location. DEC A ; Decrement the number. LD B,A ; Save it in the B-register LD C,A ; and the C-register. SLA A ; Multiply the number (2x) SLA A ; and again (4x). SLA B ; Multiply original number by 2. ADD A,B ; Add the two (4x + 2x) ADD A,C ; Add the original number. LD HL,MONTHS ; Point to the month name table. ADD A,L ; Add the offset to the table address. LD L,A ; Put it back in the table pointer. LD DE,NAME ; Point to the destination address. LD BC,7 ; Number of characters to move. LDIR ; Move the name to where it belongs. RET ; And return. ; GETDAY - This subroutine inputs and verifies the user's entered ; day number. The day number must be between 1 and the maximum ; day number of the entered month (sorry, no leap year check for ; February). If not, then the cursor backspaces over the incorrect ; entry and the user can re-enter the number. GETDAY: CALL GETDIGIT ; Get the user's number entry (day). CP 1 ; Is it less than 1? JR NC,DAY1 ; No, jump to do next check. CALL FIX ; Else, allow re-entry. JR GETDAY DAY1: PUSH AF ; Save the entered number. LD HL,MDAYS ; Point to the month days table. LD A,(MON) ; Get the already entered month number. DEC A ; Decrement it. ADD A,L ; Add it to the table pointer LD L,A ; to point to necessary table entry. POP AF ; Get the day entry back. CP (HL) ; Compare it with the table entry. JR C,DAY2 ; Jump if its OK, CALL FIX ; else, allow re-entry. JR GETDAY DAY2: LD (DAY),A ; Put the number into its location. RET ; And return. ; FIX - This subroutine allows user re-entry by backspacing over ; the two previously entered characters. The bell is rung to let ; the user know what happened. FIX: LD DE,ERRMSG ; Output the correction message. LD C,PRTSTR CALL BDOS RET ; GETDIGIT - Fetches keyboard input and converts it into a byte ; value. The byte is returned in the A-reg. The HL-regs are ; used. GETDIGIT: CALL GETINP ; Get the two entered characters. CALL GETNUM ; Convert it to a byte value. RET ; GETINP - Fetches two bytes from the keyboard that represent ; the two digits of the day, month, or year. The first byte ; (in ASCII) is converted to its numeric value and saved in ; the H-reg. The second byte is also converted and is put ; into the L-reg.   GETINP: CALL GETBYTE ; Get the first ASCII character. SUB '0' ; Make it a binary number. LD H,A ; Save it in the H-register. CALL GETBYTE ; Get the second ASCII character. SUB '0' ; Make it a binary number too. LD L,A ; Save it in the L-register. RET ; GEBYTE - Fetches a single byte from the keyboard and tests ; it value. If the entered byte is a ^C, ^M (carriage return), ; or a ' ' (ASCII space), then the date entry routine is aborted ; and the auto-boot code is executed. Else, the character is ; echoed to the console. GETBYTE: PUSH HL ; Save the HL-register. CALL GETCHAR ; Get the entered character. CP 3 ; Is character a ^C ? JP Z,BOOT ; Abort if so. CP 13 ; Is character a ^M ()? JP Z,BOOT ; Abort if so. CP ' ' ; Is character a space? JP Z,BOOT ; Abort if so. PUSH AF ; Else, save the character. LD E,A ; Display it. LD C,DIRIO CALL BDOS POP AF ; Restore the character. POP HL ; Restore the HL-register. RET ; And return. ; BOOT - Executes the auto-boot program in location BOOTFILE. BOOT: LD HL,(1) ; Get BIOS warm start address. LD L,0 ; Zero the byte address. LD A,H ; Put page address in the A-register. SUB 16H ; Calculate the CCP address. LD H,A ; Put the CCP page address in H-reg. LD (CCP),HL ; Save the CCP address. LD D,H ; Put the page address in the D-reg. LD E,7 ; Put CCP cmd buff offset in E-reg. LD HL,BOOTFILE ; Point to the auto-boot filename. LD BC,15 ; Number of characters to move. LDIR ; Move the filename to CCP buffer. LD HL,(CCP) ; Get the CCP address back. LD L,88H ; Make sure CCP points to the file LD A,8 ; name we want to execute. LD (HL),A LD HL,(CCP) LD L,89H LD A,H LD (HL),A LD HL,(CCP) ; Get the CCP address again. JP (HL) ; And go execute the boot file. ; GETCHAR - This subroutine inputs a single character from the ; console. If the character entered is a ^X, then any and all ; entered data is erased from the display and the program is ; restarted. If the character is a ^C, ^M (return), or ' ' ; (space), then return to the calling module. Then validate ; that the entered character is a number; non-numeric ASCII ; characters are ignored. GETCHAR: LD E,0FFH ; Input a console character using LD C,DIRIO ; direct console I/O. CALL BDOS OR A ; Has a key been pressed? JR Z,GETCHAR ; Loop if not; else, CP 24 ; Is character a ^X? JP Z,START ; If so, restart the program. CP 3 ; Is character a ^C? RET Z ; Return if so. CP 13 ; Is character a ^M ()? RET Z ; Return if so. CP ' ' ; Is character a ' ' (space)? RET Z ; Return if so. CP '0' ; Is character less than '0'? JR C,GETCHAR ; Yes, loop to get another input. CP ':' ; Is character more than '9'? RET C ; Return if not, JR GETCHAR ; else loop to get another input. ; GETNUM - Converts the digits in the H-reg (tens value) and ; the L-reg (units value) to a single numeric byte value. The ; byte value is returned in the A-reg. The BC-registers are ; used. GETNUM: LD A,H ; Get tens value. SLA A ; Multiply it by 8. SLA A SLA A LD B,A ; Save the intermediate result. LD A,H ; Get the tens value again. SLA A ; Multiply it by 2. ADD A,B ; Add the 8x and 2x results to get ; a 10x value. ADD A,L ; Add in the units value. RET ; And return. ; PROMPT - Displays a single character ('/') as a separator ; between the month-day input, and the day-year input. In ; this way, it functions as an input prompt. PROMPT: LD E,'/' ; Put prompt character in the E-reg. LD C,DIRIO ; Output the prompt. CALL BDOS RET ; The opening message. OPENMSG: DB CLS,'Enter today''s date (MM DD YY) ==> $' ; The input error message. ERRMSG: DB BELL,BS,BS,'$' ; The month name t able. The data moved into the month name ; location is formatted for several different languages. ; The name is preceeded by the number of characters in the ; string for those languages that require it (e.g. Pascal). ; It is also followed by a null byte (0) for other languages ; (such as C). MONTHS: DB 5,' Jan ',0 DB 5,' Feb ',0 DB 5,' Mar ',0 DB 5,' Apr ',0 DB 5,' May ',0 DB 5,' Jun ',0 DB 5,' Jul ',0 DB 5,' Aug ',0 DB 5,' Sep ',0 DB 5,' Oct ',0 DB 5,' Nov ',0 DB 5,' Dec ',0 ; The maximum days per month table. Note that each entry is ; one more than the maximum number of days for the given month ; (this simplifies comparisons). Also, note that February has ; a maximum month day of 29 (this is to allow leap year days to ; pass the check). MDAYS: DB 32,30,32,31,32,31,32,32,31,32,31,32 ; CCP address save area. CCP: DS 2 ; Auto-boot filename. First byte is the number of characters in the ; file name to be executed. Ensure the filename is in uppercase and ; that the filename is followed by at least one zero byte. Up to 15 ; characters may be entered. BOOTFILE: DB 4,'XDIR',0,0,0,0,0,0,0,0,0,0 ; Save some stack space. DS 32 ; This is where the stack starts. STACK EQU $ END DATE  ; Save some stack space. DS 32 ; This is where the stack starts. STACK EQU ug ',0 DB 5,' Sep ',0 DB 5,' Oct ',0 DB 5,' Nov ',0 DB 5,' Dec ',0 ; The maximum days per month table. Note that each entry is ; one more than the maximum number of days for the given month ; (this simplifies comparisons). Also, note that February has ; a maximum month day of 29 (this is to allow leap year days to ; pass the check). MDAYS: DB 32,30,32,31,32,31,32,32,31,32,31,32 ; CCP address save area. CCP: DS 2 ; Auto-boo%DATE.COM by L. Dunbar, 05 Jan 19851  Ev͢2R͢0͙ 8͙2P=GO'' !3oS͢0͙!:P=o8͙2Q/ ͩͶ0gͶ0o _(% 08:|'''G|'/Enter today's date (MM DD YY) ==> $$ Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  Dec       Jan  Feb  Mar  Apr  May  Jun  Jul  Aug  Sep  Oct  Nov  PAGE 56 TITLE DATE2 SUBTTL Version 2.0, 8 January 1985 ; Author: Larry Dunbar ; ; Purpose: DATE is designed to accept the month, day, and year ; numbers from the keyboard and place the data into ; locations 50h (month), 51h (day), and 52h (year). ; In addition, the month name is included beginning at ; location 53h. While the keyboard input is ASCII, the ; data stored in the given locations is a numeric byte. ; ; Usage: Refer to documentation. ; ; ; ; Use Z80 op-codes .Z80 ; Equates BOOT EQU 0 ; CP/M boot address. RDCON EQU 1 ; BDOS read console function number. DIRIO EQU 6 ; BDOS direct console I/O function number. PRTSTR EQU 9 ; BDOS print string function number. BDOS EQU 5 ; BDOS vector address. BELL EQU 7 ; ASCII bell. BS EQU 8 ; ASCII backspace. CLS EQU 26 ; Osborne-1 clear screen code. MON EQU 50H ; Month location. DAY EQU 51H ; Day location. YEAR EQU 52H ; Year location. NAME EQU 53H ; Month name location. ASEG ORG 0100H DATE: JP START DB 'DATE.COM by L. Dunbar, 05 Jan 1985' ; Begin at this point. START: LD SP,STACK ; Set stack address. LD DE,OPENMSG ; Display the opening message. LD C,PRTSTR CALL BDOS CALL GETMON ; Get and verify the month number. CALL PROMPT ; Prompt for day entry. CALL GETDAY ; Get the day byte. CALL PROMPT ; Prompt for year entry. CALL GETDIGIT ; Get the year byte. LD (YEAR),A ; Store in the year location. JP BOOT ; Exit to CP/M. ; GETMON - This subroutine inputs and verifies the user's entered ; month number. The month number must be between 1 and 12; if not,  ; then the cursor backspaces over the incorrect entry and the user ; can re-enter the number. GETMON: CALL GETDIGIT ; Get the user's number entry (month). CP 1 ; Is it less than 1? JR NC,MON1 ; If not, go do next check. CALL FIX ; Else, backspace over the entry JR GETMON ; and try again. MON1: CP 13 ; Is the month number > 13? JR C,MON2 ; No, then jump to finish processing. CALL FIX ; Else, allow re-entry. JR GETMON MON2: LD (MON),A ; Put month number in its location. DEC A ; Decrement the number. LD B,A ; Save it in the B-register LD C,A ; and the C-register. SLA A ; Multiply the number (2x) SLA A ; and again (4x). SLA B ; Multiply original number by 2. ADD A,B  ; Add the two (4x + 2x) ADD A,C ; Add the original number. LD HL,MONTHS ; Point to the month name table. ADD A,L ; Add the offset to the table address. LD L,A ; Put it back in the table pointer. LD DE,NAME ; Point to the destination address. LD BC,7 ; Number of characters to move. LDIR ; Move the name to where it belongs. RET ; And return. ; GETDAY - This subroutine inputs and verifies the user's entered ; day number. The day number must be between 1 and the maximum ; day number of the entered month (sorry, no leap year check for ; February). If not, then the cursor backspaces over the incorrect ; entry and the user can re-enter the number. GETDAY: CALL GETDIGIT ; Get the user's number entry (day). CP 1 ; Is it less than 1? JR NC,DAY1 ; No, jump to do next check.  CALL FIX ; Else, allow re-entry. JR GETDAY DAY1: PUSH AF ; Save the entered number. LD HL,MDAYS ; Point to the month days table. LD A,(MON) ; Get the already entered month number. DEC A ; Decrement it. ADD A,L ; Add it to the table pointer LD L,A ; to point to necessary table entry. POP AF ; Get the day entry back. CP (HL) ; Compare it with the table entry. JR C,DAY2 ; Jump if its OK, CALL FIX ; else, allow re-entry. JR GETDAY DAY2: LD (DAY),A ; Put the number into its location. RET ; And return. ; FIX - This subroutine allows user re-entry by backspacing over ; the two previously entered characters. The bell is rung to let ; the user know what happened. FIX: LD DE,ERRMSG ; Output the correction message. LD C,PRTSTR CALL BDOS RET ; GETDIGIT - Fetches keyboard input and converts it into a byte ; value. The byte is returned in the A-reg. The HL-regs are ; used. GETDIGIT: CALL GETINP ; Get the two entered characters. CALL GETNUM ; Convert it to a byte value. RET ; GETINP - Fetches two bytes from the keyboard that represent ; the two digits of the day, month, or year. The first byte ; (in ASCII) is converted to its numeric value and saved in ; the H-reg. The second byte is also converted and is put ; into the L-reg. GETINP: CALL GETBYTE ; Get the first ASCII character. SUB '0' ; Make it a binary number. LD H,A ; Save it in the H-register. CALL GETBYTE ; Get the second ASCII character. SUB '0' ; Make it a binary number too. LD L,A ; Save it in the L-register. RET ; GEBYTE - Fetches a single byte from the keyboard and tests ; it value. If the entered byte is a ^C, ^M (carriage return), ; or a ' ' (ASCII space), then the date entry routine is aborted ; and the auto-boot code is executed. Else, the character is ; echoed to the console. GETBYTE: PUSH HL ; Save the HL-register. CALL GETCHAR ; Get the entered character. CP 3 ; Is character a ^C ? JP Z,BOOT ; Abort if so. CP 13 ; Is character a ^M ()? JP Z,BOOT ; Abort if so. CP ' ' ; Is character a space? JP Z,BOOT ; Abort if so. PUSH AF ; Else, save the character. LD E,A ; Display it. LD C,DIRIO CALL BDOS POP AF ; Restore the character. POP HL ; Restore the HL-register. RET ; And return. ; GETCHAR - This subroutine inputs a single character from the ; console. If the character entered is a ^X, then any and all ; entered data is erased from the display and the program is ; restarted. If the character is a ^C, ^M (return), or ' ' ; (space), then return to the calling module. Then validate ; that the entered character is a number; non-numeric ASCII ; characters are ignored. GETCHAR: LD E,0FFH ; Input a console character using LD C,DIRIO ; direct console I/O. CALL BDOS OR A ; Has a key been pressed? JR Z,GETCHAR ; Loop if not; else, CP 24 ; Is character a ^X? JP Z,START ; If so, restart the program. CP 3 ; Is character a ^C? RET Z ; Return if so. CP 13 ; Is character a ^M ()? RET Z ; Return if so. CP ' ' ; Is character a ' ' (space)? RET Z ; Return if so.  CP '0' ; Is character less than '0'? JR C,GETCHAR ; Yes, loop to get another input. CP ':' ; Is character more than '9'? RET C ; Return if not, JR GETCHAR ; else loop to get another input. ; GETNUM - Converts the digits in the H-reg (tens value) and ; the L-reg (units value) to a single numeric byte value. The ; byte value is returned in the A-reg. The BC-registers are ; used. GETNUM: LD A,H ; Get tens value. SLA A ; Multiply it by 8. SLA A SLA A LD B,A ; Save the intermediate result. LD A,H ; Get the tens value again. SLA A ; Multiply it by 2. ADD A,B ; Add the 8x and 2x results to get ; a 10x value. ADD A,L ; Add in the units value. RET ; And return. ; PROMPT - Displays a single character ('/') as a separator ; between the month-day input, and the day-year input. In ; this way, it functions as an input prompt. PROMPT: LD E,'/' ; Put prompt character in the E-reg. LD C,DIRIO ; Output the prompt. CALL BDOS RET ; The opening message. OPENMSG: DB CLS,'Enter today''s date (MM DD YY) ==> $' ; The input error message. ERRMSG: DB BELL,BS,BS,'$' ; The month name table. The data moved into the month name ; location is formatted for several different languages. ; The name is preceeded by the number of characters in the ; string for those languages that require it (e.g. Pascal). ; It is also followed by a null byte (0) for other languages ; (such as C). MONTHS: DB 5,' Jan ',0 DB 5,' Feb ',0 DB 5,' Mar ',0 DB 5,' Apr ',0 DB 5,' May ',0 DB 5,' Jun ',0 DB 5,' Jul ',0 DB 5,' Aug ',0 DB 5,' Sep ',0 DB 5,' Oct ',0 DB 5,' Nov ',0 DB 5,' Dec ',0 ; The maximum days per month table. Note that each entry is ; one more than the maximum number of days for the given month ; (this simplifies comparisons). Also, note that February has ; a maximum month day of 29 (this is to allow leap year days to ; pass the check). MDAYS: DB 32,30,32,31,32,31,32,32,31,32,31,32 ; Save some stack space. DS 32 ; This is where the stack starts. STACK EQU $ END DATE  ; Save some stack space. DS 32 ; This is where the stack starts. s in the ; string for those languages that require it (e.g. Pascal). ; It is also followed by a null byte (0) for other languages ; (such as C). MONTHS: DB 5,' Jan ',0 DB 5,' Feb ',0 DB 5,' Mar ',0 DB 5,' Apr ',0 DB 5,' May ',0 DB 5,' Jun ',0 DB 5,' Jul ',0 DB 5,' Aug ',0 DB 5 DATE, Version 2.3 DATE2, Version 2.0 by Larry Dunbar 4595 Rosebud St. Cocoa, FL 32927 (305) 636-2143 10 Jan 85 ACKNOWLEDGEMENT: DAT an DATE wer inspire b a articl writte b Walte B Novinge i th Portabl Companion Jun 1983 Thes tw program wer generate b th nee t hav curren dat availabl i th syste fo suc thing a datin dat file an date stamping listings. DATŠ an DATE ar copyrighte wit al commercia right reserve b th author Th program ar release int publi domain and may be distributed without a fee or royalty. INTRODUCTION: A Mr Novinge discovered CP/ 2. lo memor location 0050 t 005B ar unused Sinc thes location ar unaffecte b rese o th Osborne- computer an informatio place i thes location wil remai unti powe interruption Th DAT an DATE program wer writte t supplemen th MBASIà program publishe i th article DAT an DATE ar writte i Z8 assemble i orde t provid smalle .CO͠ file tha ca resid o an Osborne- dis use t boo th computer Th堠 assemble sourc堠 i writte i Microsoft'󠠠 M8 macroassembler I yo d no hav thi assembler o ar unabl t modif th sourc t ru wit you assembler possibl modificatio location wil b give belo (however yo mus b abl t us DD o simila debugger). DESCRIPTION: DATŠ provide th abilit t se syste dat an execut a auto-boo fil o you choice DATE provide th abilit t onl establis syste date Bot program provid limite input error checking. Sinc DAT i designe t auto-boo .CO fil afte dat entry i shoul b rename t AUTOST.CO t provid a automati logon DAT i require t b execute onl onc fo dat entr (afte power-up) Normally resetin th compute woul caus th AUTOS progra t execut again However DAT provide chec t se i th dat ha alread bee entered I th progra determine tha rese ha take plac an no power- up th dat entr portio o th progra i skippe an th auto-boo fil i calle u fo execution Th auto-boo fil mus b define whe th progra i assembled o ma b modifie in the .COM file using DDT or similar debugger. DATE ma als b establishe a th AUTOSԠ program bu onc i finishe execution yo ar returne t th CP/ prompt Th mai reaso DATE wa writte i tha th reset/power-u chec o DAT isn' foolproof DAT check fo i locatio 0059 whic i pu ther whe th dat i entered Althoug i i unlikel thi locatio wil b zer upo power-up th chanc alway exists DATE overcome thi possibilit b alway askin fo you dat entry regardles i yo hav alread entere i o not. USAGE: Whe eac progra executes yo wil b presente wit prompt: Enter today's date (MM DD YY) ==> A thi point yo ma ente tw digit representin th mont number I you entr i vali (i.e. betwee th number 0 an 12 inclusive) '/ promp wil b writte fo you da entry I you tw digi da entr i vali (i.e. betwee an th las da numbe fo th entere month inclusive) '/ promp wil b writte fo you tw digi yea entry N chec i mad o th yea entry. I th mont o da entr i invalid th bel wil soun an th curso wil backspac t th firs digi o th entr causing the error. You may then correct your entry. At any point, you may optionally enter one of the following: ^ (control-C) ^ (carriag return) (spacebar) I an on o thes character i entere i plac o digit th dat entr i immediatel aborted I th DATŠ progra i bein executed th auto-boo cod wil begi execution i th DATE progra i bein executed yo wil b returne t th CP/ prompt. I yo hav hopelessl messe u th dat entry yo ma als ente ^ؠ (control-X) Thi wil caus th progra t restart clearin th displa fo anothe attempt Al othe character wil b ignored. Th onl majo fla wit th dat entr checkin i tha n lea yea chec i provided Thi exceptio mean tha i i possible to enter a date corresponding to February 29, 1985. NOTES: I orde t properl execut th DAT program th auto-boo fil yo desir mus b identifie withi th progra an mus resid o th dis wit th DAT program Th XDIR.CO progra i define i th currentl distribute versio o th DAT program. Thes program hav bee teste o a Osborne- unde th following hardware conditions: 1 Osborne-1 doubl densit disks Nuev 80-colum displa running at normal 52-columns. 2. Same as 1, but 80-column display running at 80-columns. 3. Same as 2, with Trantor hard disk. Th堠 mai reaso th progra wa teste䠠 i thes configuration i tha eac ha differen BIOӠ loaded Th onl proble encountere i tha th DAT progra cannot repeat canno b execute fro th har disk Th reaso i tha norma BIO i loade fro flopp t boo th O-1 I orde t brin th har dis t life i i boote wit BIOӠ overla tha i tur alter th CP/ CC (comman processor) Th DAT progra execute it auto-boo fil b insertin th desire filenam i th "normal CC are o memory Onc th har dis i on-line th CC i altere t Tranto versio o ZCPR Thi o course move pointer t area unknow t DATE I DAT i execute fro har dis partition yo wil definitel sen th syste t never-neve land DAT ca b use wit th har dis syste sinc yo mus firs boo th Osborn fro flopp disk Simpl ensur tha th DATE.CO progra an it auto-boo fil resid o th flopp disk an execut DAT (manuall o a th AUTOS program befor bootin th har disk. N problem wer encountere i executin th DATE progra in any hardware configuration. MODIFICATIONS: No modifications are needed with the DATE2 program. Th auto-boo featur o DATE.CO function a standar AUTOST.CO file T modif th filenam tha wil automaticall execute: 1 I yo ar capabl o assemblin th sourc file alte the date at label BOOTFILE. 2 I yo mus modif th cod usin DDԠ o anothe debugger, the boot file name is located at 02C4h. a. Th firs byt a thi loctio represent th numbe o character containe i th boo filename Followin thi byte ente th characte value o th filenam yo desir (d no ente th .CO͠ extension) Afte th filenam ha bee entered ente a leas on 0 Spac ha bee allocate fo 15 character (includin th coun byt an th zer byte) Th stac begin 3 byte afte th filename s enterin mor tha 15 character coul caus i t b overwritte b th stack b.Th progra i se u t mov onl 15 character t th CC area I yo ente mov tha 15 yo mus chang th valu a 01EB t th numbe o character t b moved. DATE STORAGE: The date information is stored in low memory as follows: Location Data 0050h Month number 0051h Day number 0052h Year number 0053h Number of characters in the month name 0054h A ' ' 0055h First character of month name 0056h Second character of month name 0057h Third character of month name 0058h A ' ' 0059h A zero value Th month da an yea number ar byt value tha ca b peeke wit a MBASI program Th storag o th mont nam ha bee designe t confor wit th man possibl strin storag design use b differen languages Th fina zer valu a locatio 59 i use bot t terminat th strin a th langaug woul an t indicat tha dat ha bee entere whe th DAT progra i executed I thi locatio i 0 the DAT assume yo hav alread entere dat an wil ski th dat entry and execute the auto-boot file. RETRIEVING THE DATE: Th followin Turb Pasca progra demonstrate ho t retrieve the date data: program GetDate; var m : byte absolute $50; { Point to month number } d : byte absolute $51; { Point to day number } y : byte absolute $52; { Point to year number } nam string[5 absolut $53 Poin t mont nam } begin writeln('Date ==> ',d,'/',m,'/',y); writeln('Date ==> ',d,name,y); halt; end. In MBASIC, the date can be accessed by: 100 ' Print the date in numbers. 110 PRINT PEEK(&H50); ' The month number. 120 PRINT "/"; PEEK(&H51); ' The day number. 130 PRINT "/"; PEEK(&H52); ' The year number. 140 ' 141 ' There are two ways to access the month name. 142 ' First, the FOR loop method. 150 FOR I = &H54 TO &H58 : PRINT CHR$(PEEK(I)); : NEXT I 160 ' 170 ' The second method allows you to access the month name 171 ' as a string variable. But beware of how you use this, 172 ' since putting anything into this location will most 173 ' likely overwrite low memory pointers and crash your 174 ' system. 175 ' The variable must already exist for VARPTR to work 176 ' correctly, so make it. 180 MONTH.NAM$ = "12345" ' Use any 5 dummy characters. 190 I = VARPTR(MONTH.NAM$) ' Get the pointer to the string. 200 ' Now alter the pointers for the string to make it look 201 ' in low memory for the string. 210 POKE I+1,&H54 : POKE I+2,0 I' stil novic programme an haven' gotte th han o usin pointer yet s perhap on o yo ca provid th necessary routine.au a k >=>={ VU T *#"^q#Vp"1@  4/ 4* 4!>~G#ڤʤ 1@  4 4&2L S,R³,g&C,äX,ͯH! L 4!p "P O! *P  "P :O <2O AU!!p "P Rg}_[Sx 4Rg}e[SeGg*P ] "P !<H ʳ͗g[›H!] ^g[{_,x.,#³g[ ?,Û] 4!=g[P.,!^g{O#Yg[BG-gQ,H!O 5}gH 4ͯH !^!\@  :J 2K  /µ 4 4ʤ͗[R¤Sg͗[Gº[H 4\!@  :K 2J _,Xgg!M  [ w_g#[]!M  :J 5?7~#(H!M :J y!g]]y~+ t]~+ t#6$+i 4!]2N !< 4&N¯,ͯ Y›,!N 6 4!eU ~6$#!<z ʐ>2M  g 4![^NgPg[wO#[3B,Bg.,!V2M  ÐGgp͗,d!\L  2X 2[ :N ʝL  ü!L l !<ʹ2M  4H2M ä ~_,x.,#,m _Hz!hi6 !< 4\$$ȷ_,H4 , ,H ó͗[͗Œzk- 4Œ͗À+4:M 2M  4.,é 4!p q 6 !\]6  2h2k2|!p  ,y 6,E 4!y y,:q :>@A~##:p @ @  2\]~0^:~*ʛ.rxù‡x:L S#^~.ʹ>?œ#~.ʹ¦#Î#e~Oxy.*#¿>?#~:] 2J 2O 2   4ï,{& w a{_͗x<zyP,1xjRg1[S1x1[R1>͗,,ʭz͍m :M :L R4͍/͍ 4Y 4!>~G# !s#ry ~ # >U :] <2] *^ -*s#r"" "  " " :*2*:*2*EPSNLINK for the Osborne-1 by Community Business Systems 3/14/85A file transfer program to communicate with the EPSON PX-8 and QX-10$The RS-232C status is :$ bit rate = 1200 data bits = 8 stop bits = 1$ bit rate = 1200 data bits = 8 stop bits = 1$Press ESC to restart, or CTRL/C to exit from EPSNLINK$Send or Receive (S/R) ? $Sender $Receiver is not ready.$Enter file name $DoneeXit or Continue (X/C) ? $ No file name specified$ File not found$ Sending $ Aborted $ Directory full$ $ Receiving $ ==> $Overwrite (Y/N) ? $ Disk full$ Rename error$ Delete error$ Close error$ Drive select error$ Bad file descriptor$RS-232C is not ready.$ $$p f  . ~ Ͷ ʻ .͓ =« f |« }w#Ä >2L͐ ! =« f }ʫ +"MD Å D  !  # EPOSLK.COM EPOSLK.COM is a version of EPSNLINK.COM (written by Jim Dorsey 75765,317) configured for the Osborne-1. It is designed to work in conjunction with the EPSON PX-8 GENEVA's ROM based FILINK.COM program. This allows individual and batch transfer of files (both ASCII & BINARY) between the Osborne & Geneva using the Geneva's built-in program. It can therefore be accessed whenever the CP/M Utilities ROM is installed. Alternatively FILINK.COM can be 'PIP'ed to the Geneva's RAM disk and run there. EPOSLK.COM is set up for 1200 baud, 8 data bits, no parity. The Geneva must also be set to these same parameters using CONFIG.COM. The user interface of EPOSLK.COM is identical to FILINK.COM making it easy to use and requiring no more instructions than those given in the EPSON documentation concerning FILINK.COM. The source of EPSNLINK is available on the Compuserve Epson SIG in DL4 as 'EPSNLK.ASM'. Please note, however, that as of the date of this writing the source code cannot be assembled and run on the Osborne without a few alterations. EPOSLK.COM is the product of a slight modification of the EPSNLK.ASM code. Note in particular that the Osborne can only run at 300 or 1200 Baud unless the hardware is modified. The Osborne specific areas of EPSNLK.ASM set the Baud rate at 19,200, more than the Osborne can handle. A somewhat streamlined version of the source code that can be assembled and run on the Osborne without modifications should be forthcoming. John Fox (72436,3652) April 16, 1985  set to these same parameters using CONFIG.COM. The user interface of EPOSLK.COM is identical to FILINK.COM making it easy to use and requiring no more instructions than those given in the EPSON documentation concerning FILINK.COM. The source of EPSNLINK is available on the Compuserve Epson SIG in DL4 as 'EPSNLK.ASM'. Please note, however, that as of the date of this wriͫCopyright (C) 1984 BORLAND IncA Osborne 1 modelsCP/MlZ= *ERTm(l)~7#~=% o&ͦoͦܐԩͣ}!!"8~#(}:$= +*!Z!*B!!:(=2!Z: <2!!!:O::O:!*B! !45(!.+/ 0y0( d!kZ!{Z͈͈o&  :(y ͠|( *"x2y( >28!?"9!!>2 :D]SXN]D [ (!e}̈́A8Q0G: x@!\w# (   yV. V!h6# (*(.(!8}(*(̈́w#>?> w#a{ |͒}͛Ɛ'@'7||}>"C"6# ""͐ͩ*B"[R5*"^#V#^#V#N#FO/o&9O/o&9!9(> (G!9 w#E͊w}8uRB0 >R@RR!+ͨ z R!+ͨ z <!+ͨ z <!+ͨ z <!#ͨ z <!+ͨ z T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!͐b Date ==> *Q&!! 4 #4! x *$ *>w""{_!"*nf}(HR0nf" ^VMDnfutqpvar m : byte absolute $50; d : byte absolute $51; y : byte absolute $52; name : string[5] absolute $53; begin writeln('Date ==> ',d,'/',m,'/',y); writeln('Date ==> ',d,name,y); halt; end. DATE MACd'()*+,-./0123DATE2 COM4DATE2 MACU56789:;<=>?DATE DOCX@ABCDEFGHIJEPOSLNK COMKLMEPOSLINKDOC NOGD COM?PQRSTUVWGD $$$1wFͥ@Ͷ@AvASA|AA@Q2!wF~# x@>21wF> 2@ͮ@A͔Aͮ@A͎A<ʐ@!wF"@V@*@#N@"@[@͂AA͚A@:@=2@w@I@A͈A<ʐ@ͥ@DvASAͥ@EvAAvA @vA$2A2A?A@vAIA\A?A AvAIA\A$ $FAvAg$PAvAG$ZAvA$> oA> oA_ OSB1PROMCOM ---------------------------------------------------- | ************************************************ | | * * | | * >>>>>>>>>>>> N E W R O M <<<<<<<<<<< * | | * * | | ************************************************ | ---------------------------------------------------- * NEWROM IS A PROGRAM TO FETCH THE SYSTEM PROM * * OF THE OSBRONE 01 ,THEN STORE IT IN A DISK * * FILE UNDER THE NAME OF " OSB1PROM.COM " ---- * * WELL NOW THAT YOU HAVE THE FILE HAVE FUN WITH * * THE D I S A S S E M B L Y ! ! ! ! * * TYPE "A" TO CONTINUE PROM READ OPERATION * * TYPE "Q" TO QUIT / RETURN TO SYSTEM * ********* MAKE SELECTION -----> $ ---------------------------------------------- >>>>>>>>> FILE SAVE WAS SUCCESSFUL <<<<<<<<< >>>>>>>> FILE NAME IS OSB1PROM.COM <<<<<<<< ---------------------------------------------- $ ################################################ >>>>>>>>> FILE SAVE WAS UNSUCCESSFUL <<<<<<<<< ################################################ $************************************************* >>>>>>>>>>>>>>> NEWROM.DOC <<<<<<<<<<<<<<<<<<<< NEWROM is a version of "ROM" (well sort of). the result is basicly the same. NEWROM will read the system eprom of an OSC 01 and store it in a diskfile named "OSB1PROM.COM". The file is saved on the defaukt drive. So if you are interested in disass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,1Ú_;U3S*pN.XC9jHIPfϝߨג 58HGHj 6QCw#IoPdYӰ+ _P ů(X՚fMEfӘD 5wfȬcVkߩIjY!pH Rd Zz{GO2+5.I]Q XӬiX&EsQә#֯?iS 8s I 6Љ!aXؚF)J9U9`bMT#?`HTL.\&.4**p$%EFww.*R©8ҙ ʜsxYW̓LDm̊]D&sĒ*PM"oM_fz0Qqvyf\&.͚.>BeD&sĒ*PM""WNgtd8<3.DvfM/3}pO׉M.;S!Qi4 3dN.;̚ tw|C\9ZH'[#)(Gc/@NiHA9tw¨+k5 "1+S-JGZӬTON135 IE:e6P35/P?'QC*>U:ȕә5Yi4 u A]QO$7L$St9Q?׉<2$, 1a :ek5K%2ۺ5d.N U<3CU aݚf @dMPW??.;֯PdG8$I[7kF;u9S54**p$%EFww.*R©8ҙ ʜsxYW̓LDm̊]D&sĒ*PM"oM_fz0Qqvyf\&.͚.>BeD&sĒ*PM""WNgtd8<3.DvfM/3}pO׉M.;S!Qi4 3dN.;̚ tw|C\9ZH'[#)(Gc/@NiHA9tw¨+k5 "1+S-JGZӬTON135 IE:e6P35/P?'QC*>U:ȕә5Yi4 u A]clink main DEFF CIO * */ #include "a:bdscio.h" /* Make sure BDSCIO.H has been customized for your system! */ /* Device-specific definitions... Input status flag: */ #define ISTAT (bios(2,0)) /* use the bios input status function */ /* character output status: */ #define OSTAT (1) /* since the Osborne does its own I/O, it's allways ready! */ /* Internal static definitions. */ #define Freeze (static[1]) /* true if output frozen (^S) */ #define Pending (static[2]) /* true if input char waiting */ #define PendCh (static[3]) /* the pending input char */ #define Mode (static[4]) /* input mode bits: */ #define M_echo 1 /* echo mode bit */ #define M_quit 2 /* ^C (quit) mode bit */ #define M_flow 4 /* ^S/^Q flow control */ #define M_strip 8 /* strip to 7-bits */ #define M_expan 16 /* Expand \n on output. */ #define QuitC (static[5]) putchar(c) { rawio(1, c); } getchar() { return rawio(2); } kbhit() { return rawio(3); } TTYMode(mode) { return rawio(4, mode); } /* set mode bits, returns prev. */ rawio(key, arg) { char ch, *static, mode; static = "Nonsense!"; if (*static == 'N') /* Initialization ... */ { *static = Freeze = Pending = 0; Mode = M_echo | M_quit | M_flow | M_strip | M_expan; QuitC = 3; } Again: if (ISTAT) /* check for input pending. */ { ch = bios(3,0); /* use bios to get input! */ if ((mode=Mode) & M_strip) ch &= 0x7F; if ((mode & M_quit) && (ch == QuitC)) exit(); else if (mode & M_flow) { if (ch == ('S'-64)) { Freeze=1; goto brk; } if (ch == ('Q'-64)) { Freeze=0; goto brk; }} if (!Pending) { Pending = 1; PendCh = ch; if (mode & M_echo) bios(4, ch); }} brk: switch(key) { case 0: return; case 1: if (Freeze || !OSTAT) goto Again; /* putchar(arg) */ bios(4, arg); if ((arg == '\n') && (Mode & M_expan)) putchar('\r'); return arg; case 2: if (!Pending) goto Again; Pending = 0; return PendCh; case 3: return Pending; case 4: mode = Mode; Mode = arg; if (!(arg & M_flow)) Freeze = 0; return mode; default: return; } }  = Mode; Mode = arg; if (!(arg & M_flow)) Freeze = 0; return mode; default: return; } } _expan; QuitC = 3; } Again: if (ISTAT) /* check for input pending. */ { ch = bios(3,0); /* use bios to get input! */ if ((mode=Mode) & M_strip) ch &= 0x7F; if ((mode & M_quit) && (ch == QuitC)) exit(); else if (mode & M_flow) { if (ch == ('S'-64)) { Freeze=1; goto brk; } if (ch == ('Q'-64)) { Freeze=0; goto brk; }} if (!Pending) { Pending = 1; PendCh = ch; if (mode & M_echo) bios(4, ch); }} brk: switch(key) { case 0: return; case 1: if (Freeze || !OSTAT) goto Again; /* putchar(arg) */ bios(4, arg); if ((arg == '\n') && (Mode & M_expan)) putchar('\r'); return arg; case 2: if (!Pending) goto Again; Pending = 0; return PendCh; case 3: return Pending; case 4: mode = Mode; Mode = arg; if (!(arg & M_flow)) Freeze = 0; return mode; default: return; } }  /* Osbourne Modem I/O Routines These routines are the Osbourne versions of the routines needed to make TELNET work. To make TELNET work with the Osb 1 make the obvious modifications to telnet.c and recompile. by: Dan Sunday 7473 Broken Staff Columbia, MD 21044 (301)-730-6838 date: 4-23-82 Note: by suitably resetting the io byte assignments in this package, I and Dave Richardson have successfully used the modio.c routines to get TELNET working on the TRS-80 Model 2 using Pickles & Trout */ #include "a:osbdscio.h" /* Routine to return true if input is present at the modem port. */ miready() { char c; char *iob,sviob; iob = 3; sviob = *iob; /* save io byte */ *iob = 1; /* console:= serial port */ c = bios(2); /* get console status */ *iob = sviob; /* restore io byte */ return c; /* return input status */ } /* Routine to return true if modem is ready to output a byte. */ moready() { char c; char *iob,sviob; iob = 3; sviob = *iob; /* save io byte */ *iob = 0x40; /* list device:= serial port */ c = bios(16); /* get list device status */ *iob = sviob; /* restore io byte */ return c; /* return output status */ } /* Get a byte from the modem: */ mgetch() { char c; char *iob,sviob; /* I/O Byte */ unsigned n; /* time-out counter */ for (n=20000; !miready() && n; n--) if (kbabort()) return ABORT; /* Abort Input */ if (!n) return TIMOUT; /* Read Time Out */ iob = 3; sviob = *iob; /* save io byte */  *iob = 1; /* console:= serial port */ c = bios(3,0); /* get input char */ *iob = sviob; /* restore io byte */ return c; /* return input */ } /* Output a byte to the modem: */ mputch(c) char c; { char *iob,sviob; while (!moready()) if (kbabort()) return ABORT; /* Abort Output */ iob = 3; sviob = *iob; /* save io byte */ *iob = 0x40; /* list:= serial port */ bios(5,c); /* output char */ *iob = sviob; /* restore io byte */ return OK; /* A-OK */ } mputs(s) char *s; { while (*s) mputch(*s++); } /*-----------------------------------------*/ /* Return true if keyboard hit and SPECIAL typed: */ kbabort() { if (kbready() && getch() == SPECIAL) return ABORT; return OK; } kbready() { return bios(2); } /*  Get a character from the keyboard: (Uses a direct BIOS instead of going through the BDOS. By naming this the same as the library version of "getchar", we insure that THIS version is used by things like "gets" instead of the library version.) */ getchar() { char c; c = getch(); if (c == '\r') c = '\n'; putchar(c); return c; } getch() { return bios(3); } /* Write a character to the console. */ putchar(c) char c; { if (c == '\n') putch2('\r'); putch2(c); } putch2(c) char c; { bios(4,c); } SIG/Access: v set of keywords supplied by their submittor. The list may be a series of wo*/ /* Return true if keyboard hit and SPECIAL typed: */ kbabort() { if (kbready() && getch() == SPECIAL) return ABORT; return OK; } kbready() { return bios(2); } /* ; ;based on a disassembly of ospatch.com which is so ridiculously ;specific to "standard" osbornes that it is useless to anyone ;who has had the good sense to modify their bios.... ; ;this routine simply blinks the cursor ; .Z80 ASEG ORG 0100H ; ;some of these are in the os-1 mram and are in the same locations no matter ;what size bios you are running... if the value isn't expressed as BIOS+xxx ;then leave it be unless you've been messing around up in mram then you better ;change them as appropriate..... ; BIOS EQU 0D500H ;start of bios jump table ; BELCNT EQU 0EF6BH CONSTAT EQU 0DB3FH CURPOS EQU 0EF5AH CONOUT EQU 0DB49H KEYIN EQU 0E3DAH ;call to rom in the key input routine NUMDPB EQU 0E03EH ;value to flag the number of active dpb's HSTBUF EQU 0E960H ;fixed disk buffer location in mram LKEY EQU 0EF5EH ;last valid keystroke stored here (mram) ROMCALL EQU 0DEBEH ;where our routine sits (was xerox dpb) ; RATE EQU 0F0H ;0=realslow, f0=realfast ; JP START ; PRINT: LD C,9 JP 5 ; EXIT0: CALL PRINT ; EXIT: LD SP,(STACK) RET ; START: LD (STACK),SP ;set system stack locally LD SP,STACK ;saving old one first ; LD DE,CLEAR ;clear the screen CALL PRINT ; LD DE,HELLO ;print welcome message CALL PRINT ; BIOS1A: LD HL,ROMCALL ;replace the call to rom in key input routine LD (KEYIN),HL ;with one of our own to do some pre-processing LD A,2 ;let system know that we only have 2 dpb's now LD (NUMDPB),A ;FORCE SYSTEM TO ONLY LOOK FOR 2 DPB'S ; LD HL,CURFLASH LD DE,ROMCALL ;our routine location LD BC,ROUTLEN ;length of routine LDIR LD DE,GOODBY JP EXIT0 ; CURFLASH: LD HL,(CURPOS) LD A,(HL) XOR 80H ;get current character and set/reset hi bit LD (HL),A REENTR0: LD A,3 LD (BELCNT),A LD A,RATE LD (HSTBUF+1),A REENTR1: LD HL,(HSTBUF) INC HL LD A,L OR H JR Z,CURFLASH ;delay loop for flash using hl to count ; LD (HSTBUF),HL CALL CONSTAT ;see if anything waiting at keyboard JR Z,REENTR1 ;nothing there so skip back to flash routine LD HL,(CURPOS) ;got a character so set curpos character normal LD A,(HL) OR 80H LD (HL),A DI ;interupts could be a pain just now!! LD HL,LKEY LD C,(HL) ;get the last valid keystroke XOR A LD (HL),A ;null it out and LD A,C ;get the character just entered to keyboard EI ;interupts are okay again now CP 1CH ;clear screen character JR Z,PRTCLR ;yes, so go RET ;return from our routine back to key-in check ; PRTCLR: LD A,1AH CALL CONOUT ;clear the screen RET ;done ; ROUTLEN EQU ($+1)-CURFLASH ;length of our routine ; ;messages ; CLEAR: DB 1AH,0AH,0AH,0AH,'$' ; HELLO: DB 'System BIOS being patched for a blinking cursor,' DB 0DH,0AH DB 'bell if ^P entered when already in print mode,' DB 0DH,0AH DB 'and clear-screen by use of ^/ ..... patching.' DB 0DH,0AH,'$' ; GOODBY: DB 0AH DB 'Done... system BIOS now patched (note the blinking cursor!' DB 0DH,0AH,0AH,'$' ; DS 64 ;local stack storage STACK: DW 00 ;old stack saved here ; END ; L),A DI ;interupts could be a pain just now!! LD HL,LKEY LD C,(HL) ;get the last valid keystroke XOR A LD (HL),A ;null it out and LD A,C ;get the character just entered to keyboard EI ;interupts are okay again now CP 1CH ;clear screen character JR Z,PRTCLR ;yes, so go RET ;return from our routine back to key-in check ; PRTCLR: LD A,1AH CALL CONOUT ;clear the screen RET ;done ; ROUTLEN EQU ($+1)-CURFLASH ;length of our routine ; ;messages ; CLEAR: DB 1AH,0AH,0AH,0AH,'$' ; HELLO: DB 'System BIOS being patched for a blinking cursor,' DB 0DH,0AH DB 'bell if ^P entered when already in print mode,' DB 0DH,0AH DB 'and clear-screen by use of ^/ ..... patching.' DB 0DH,0AH,'$' ; GOODBY: DB 0AH DB 'Done... system BIOS now patched (note the blinking cursor!' DB 0DH,0AH,0AH,'$' ; DS 64 ;local stack storage STACK: D*K͞+  '+FÎr ͖ 8{ Ăw#w#w^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2qZZk:q|/g}/o#|/g}/o#:q<2qqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2qZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! !9~#A"s!`*"!"!Y">2>2>22!"!"!@"!" ʞ!F#x±~#±!b2r~# "2r+}|~#G:rx"2r+w# +6#!6#2w2x*s!>r<o&F=-` r'~h6!+`W?_!~7z?` :>ª@w#G.¶ww#?*>?w#> w#.7:77!a{   `OE!y6$ -7rBo&))T])))!y!>15:<15>{15Y/e56!'":}15Y/!:&1515\0!:</"͞) :<@"ͧ*͞)Z!:<>L">15͞)>15>@2G>)15ç"#(l'ͷ**͞)!2"ͫ'-L3#ͷ&"x0e5G)͍'ͫ'ͷ**͞)b)~F9#^#V##!2)))U~,L3G~`2<2<#~2<~?>T#=2<#^#V#^#V#"<^#V"<:<~#*<!:<@ʏ#"<*<#w"<*<~ʫ#¶#,L3;+"<*<+" Where "baud" is 300,1200, or 9600 Z !9DM͐n}4 ! ^#Vr+sn&  7*+++:G_*DM!U o&c ö !9DM! ] |ʋ !] +++|‹ ` ! n} £ ! !] ! n&!] 7:O*o` ў)>15>@2G>)15ç"#(l'ͷ**͞)!2"ͫ'-L3#ͷ&"x0e5G)͍'ͫ'ͷ**͞)b)~F9#^#V##!2)))U~,L3G~`2<2<#~2<~?>T#=2<#^#V#^#V#"<^#V"<:<~#*<!:<@ʏ#"<*<#w"<*<~ʫ#¶#,L3;+"<*<+" Where "baud" is 300,1200, or 960/* ---------------------------------------------------- -- -- Setbaud version 1.0 -- -- Copyright (c) 1983 by David Steffen -- All Rights Reserved -- -- Setbaud is Copyright (c) 1983 by David Steffen -- who assumes no responsibility or liability for its -- use. Setbaud is released to the public domain -- for non-commercial use only. -- -- -- David Steffen encourages the public to freely -- copy and use this program for non-commercial -- purposes. Any commercial use of this program -- without prior written authorization by the -- author, David Steffen, is strictly prohibited. -- ---------------------------------------------------- */ #include a:bdscio.h #define SETBAUD 20 /* for call on BIOS to change baud */ #define RESET 0x57 #define BAUD300 0x56 #define BAUD1200 0x55 #define BAUD9600 0x54 main( argc,argv ) int argc; char *argv[]; { puts( "\n\n\n" ); if ( argc < 1 ) { help(); } else { switch ( *argv[ 1 ] ) { case '3': { puts( "Setting baud rate to 300...\n\n" ); bios( SETBAUD,BAUD300 ); break; } case '1': { puts( "Setting baud rate to 1200...\n\n" ); bios( SETBAUD,BAUD1200 ); break; } case '9': { puts( "Setting baud rate to 9600...\n\n" ); bios( SETBAUD,BAUD9600 ); break; } default: { help(); } } } } help() { puts( "USAGE:\n" ); puts( " SETBAUD \"baud\"\n\n" ); puts( "Where \"baud\" is 300,1200, or 9600\n\n" ); } ------------------- */ #include a:bdscio.h #define SETBAUD 20 /* for call on BIOS to change baud */ #define RESET 0x57 #define BAUD300 0x56 #define BAUD1200 0x55 #define BAUD9600 0x54 main( argc,argv ) int argc; char *argv[]; { puts( "\n\n\n" ); if ( argc < 1 ) { help(); } else { switch ( *argv[ 1 ] ) { case '3*K͞+'+FÎr ͖ 8{ Ăw#w#w^#V#*~#fo^#*~#fo^#V#*n^#*n^#V# ~#fo^#& ~#fo!+!#!+!#!+!+}|z{|}|z7||7zZZ)|/g}/o#|͉k|/g}/o#ɯ2qZZk:q|/g}/o#|/g}/o#:q<2qqDM!xxGyO҃)v|͔`i|)Öxڷz/W{/_ѯzW{_=yOxGæ2qZZ͉M|}ȯ|g}o)|/g}/o#z/W{/_!9~#fo! ! ! ! ! ! !9~#A"s!`*"!"!Y">2>2>22!"!"!@"!" ʞ!F#x±~#±!b2r~# "2r+}|~#G:rx"2r+w# +6#!6#2w2x*s!>r<o&F=-` r'~h6!+`W?_!~7z?` :>ª@w#G.¶ww#?*>?w#> w#.7:77 !a{   `OE!y6$ -7rBo&))T])))!y!>15:<15>{15Y/e56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!9DM! n&͂|ʬ! n&ñ! n&|ö!9DM! n&ͽ! sͺ|! n&s#! n&}! n&s#!! n! n&+B!K! n&!9DM! n&aͯx! n&zͯÅM!9DM! n&|ͣ²! n&͂|ͣ!9DM! n&0ͯ! n&9ͯ!9DM! n&Aͯ! n&Zͯ7:O*o`0û!9DM! *|X!*+++|X-! n} p! !*! n&!* 6  #F#xʫ~#Þ7*:w  ^#Vr+sn! s{U! n͐n}5! ^#Vr+sU`in}R! ^#Vr+s! ns`in}t! 4͐6! ^#Vr+s/ `in}¥͐n&! ^#Vr+s~#fo ! 4! ^#Vr+s/ ! n&`in}! ^#Vr+s~#fo͐ ͐?s#r! 4/ ! n&!9!9DM! n} ͝5! n} ͝5! n} ͝?!9DM͐~#fon`is<|n͐^#Vr+sG`in&v!9ÅM!9DM! n&͂|ʬ! n&ñ! n&|ö!9DM! n&ͽ! sͺ|! n&s#! nmp!6P!!6!P 1pROM copied successfully. Ready for SAVE 16 ROM.COM$p!gCTERM COM@CTERM DOCCTERM C 1 !"#$%DATE COM&DATE MACd'()*+,-./0123DATE2 COM4DATE2 MACU56789:;<=>?DATE DOCX@ABCDEFGHIJEPOSLNK COMKLMEPOSLINKDOC NOGD COM?PQRSTUVWGD PASXNEWROM COMYZ[\]^_`abcdefghNEWROM COM+ijklmnNEWROM DOCoOREMOTE AQMCpqrstuvwxOSBDSCIOC ,yz{|}~OS-CIO OSBOSMDIO C OSBLINK MACOZZYBAUDCOMOZZYBAUDC OZZYTIMECOM$ROMDUMP $$$!.z80 aseg org 0100h ; This routine copies the Osborne One ROM contents to ; RAM starting at location 0100 H. ; Bob Scott SV FOG Sept 1985 ; ; hicode equ 7000h ;location of switch/copy ;routine flag equ 0ef08h ;bank select location romsize equ 1000h ;size to copy start equ 5000h ;common (temporary) buffer start final equ 0100h ;ending buffer start bdos equ 05h ; ; call lifter ;move code to top of memory jp hicode ;execute it ; copy: di ;disable interrupts out (00),a ;output to port zero ld hl,flag ld (hl),00h ;select bank ; ; now running in bank two, with access to ROM ; use z80 block move to copy it to locations 5000 -> 6000 H ; ld de,start ;first move ld hl,00h ;rom base address ld bc,romsize ;length of rom ; ; do block move to commom memory area ; ldir ; ; now switch back to bank one ; out (01),a ;output to port 1 ld hl,flag ld (hl),01h ;select bank ei ;enable interrupts ; ; now running in bank one, with access to low RAM ; use z80 block move to copy our buffer to low RAM ; starting at 0100h. ; ld de,final ld hl,start ld bc,romsize ; ; do it ; ldir ; ; ROM contents now starts at 0100h...inform ; user and quit to CP/M ; ld c,09h ;set up string print to screen ld de,msgloc call bdos ;print it jp 00h ;return to CP/M ; msg: db 'ROM copied successfully. Ready for' db 0ah,0dh,'SAVE 16 ROM.COM$',00h clen equ $-copy msgloc equ 7000h + clen - ($ - msg) ;confusing, isn't it? ; ; code to move copy routine to high memory. ; (again using the z80 block move) ; lifter: ld de,hicode ld hl,copy ld bc,clen ldir ret ; end to high memory. ; (again using the z80 block move) ; lifter: ld de,hicode ld hl,copy ld bc,clen lmsize ;length of rom ; ; do block move to commom memory area ; ldir ; ; now switch back to bank one ; out (01),a ;output to port 1 ld hl,flag ld (hl),01h ;select bank ei ;enable interrupts ; ; now running in bank one, with access to!^!{( +Z#~A{P > A> Az|L0 _}x!CTERM COM@CTERM DOCCTERM C 1 !"#$%DATE COM&DATE MACd'()*+,-./0123DATE2 COM4DATE2 MACU56789:;<=>?DATE DOCX@ABCDEFGHIJEPOSLNK COMKLMEPOSLINKDOC NOGD COM?PQRSTUVWGD PASXNEWROM COMYZ[\]^_`abcdefghNEWROM COM+ijklmnNEWROM DOCoOREMOTE AQMCpqrstuvwxOSBDSCIOC ,yz{|}~OS-CIO OSBOSMDIO C OSBLINK MACOZZYBAUDCOMOZZYBAUDC OZZYTIMECOM$ROMDUMP COMROMDUMP MACSCPRT2 $$$ .Z80 ASEG BOOT EQU 00H BDOS EQU 05H WRLST EQU 05H CR EQU 0DH LF EQU 0AH LENG EQU 24 WIDTH EQU 80 INCR EQU 48 BASE EQU 0F000H MASK EQU 7FH CURPOS EQU 0EFEFH ; ; ORG 0100H ; LD HL,CURPOS ;GET CURRENT VERTICAL OFFSET LD E,(HL) LD HL,BASE LD BC,0080H ; MLOOP: LD A,E ;MULTIPLY OFFSET MY NUMBER OF CP 00H ;CHARACTERS IN A LINE TO POINT AT JR Z,PRINT ;FIRST CHARACTER OF TOP SCREEN LINE ADD HL,BC DEC E JR MLOOP ; PRINT: DEC HL ;PRINT FIRST 80 COLS OF NEXT 24 LINES LD D,0 LD E,D ; LOOP: INC HL LD A,(HL) AND MASK CALL PROUT INC E LD A,E CP WIDTH JR NZ,LOOP ; ; LD A,CR CALL PROUT LD A,LF CALL PROUT INC D LD A,D CP LENG RET Z LD A,H CP 0FFH CALL Z,ADJ ;IF AT TOP OF VIDEO MEMORY, WRAP TO LD E,0 ;BOTTOM USING "ADJ" ROUTINE LD BC,INCR ADD HL,BC JR LOOP ; PROUT: PUSH DE PUSH HL LD E,A LD C,WRLST CALL BDOS POP HL POP DE RET ; ADJ: LD A,L CP 78H RET M LD HL,BASE-INCR-1 RET ; END  LD E,This library contains the following Osborne 1 specific programs: ROMDUMP.MAC ROMDUMP.COM SCPRT2.MAC SCPRT2.COM The first two are the source and assembled versions of a program to copy the contents of the O1 ROM to the TPA starting at 0100h. You may then save a copy of the ROM to a disk file using the CP/M SAVE command. to use just type: ROMDUMP The program will immediately print something like: ROM copied...Ready for SAVE 16 ROM.COM Typeing the SAVE... stuff will produce a disk copy of the ROM file on the currently logged disk. You may then peruse this file with DAZLSTAR, ZSID, etc. This handy both for the curious, or for those interested in sticking their own code into the ROM, or for those who just want to add their name to the boot prompt message. The later two of course require a ROM programmer and a blank ROM. You may also use UNLOAD on the ROM.COM file to produce an INTEL HEX format file which some ROM burners will accept. (Note that you may ha"ve to manually 'back up' the code 100H bytes, since UNLOAD is hardwired into a 0100H ORG location, and the ROM really starts at address 0000H) The second program is just a simple OSBORNE 1 screen dump utility. It is invoked by typing "SCPRT2" at the CP/M system prompt. I really intended for this to be incorporated into other programs to provide them with a screen dump capability, so I've included the source code. If you change the one JP P,.... instruction to a JR of some type (just a couple of new instructions) the program would be completely devoid of absolute jumps, and hence totally relocatable. You could then plug it into an already assembled program (like MEX) without having the source code...my next project. Note that this screen dump business is some what nontrivial, as the current 'top' of the Ozzy screen changes with each line scroll, hence you have to uncover the where the current top is to start. One approach is to find the cursor, but unless the little critter is on the bottom line, that don't always cut it. The method presented seems to work fine (checking the system byte VERTOFF). Both of the included source files are in Zilog format, hence require a Z80 assembler to fool with.....have fun. Bob Scott SV FOG Sept 1985 d source files are in Zilog format, hence require a Z80 assembler to fool with.....have fun. Bob Scott SV FOG Sebility, so I've included the source code. If you change the one JP P,.... instruction to a JR of some type (just a couple of new instructions) the program would be completely devoid of absolute jumps, and hence totally relocatable. You could then plug it into an already assembled program (like MEX) without having the source code...my next project. Note that this screen dump business is some what nontrivial, as the current 'top' of the Ozzy screen changes with each line scroll, hence you have to uncover the where the current top is to start. One approach is to find the cursor, but unless the little critter is on the bot;TERMINAL EMULATION PROGRAM WRITTEN FOR THE OSBORNE 1 ;DOUBLE DENSITY - SERIAL PORT BAUD RATE AS FIXED BY ;UTILITY PROGRAM "SETUP". ORIGINALLY WRITTEN 3/1/84 ; ;MARK MERRILL AALDERING ;12301 Luna Pl. ;Granada Hills, Ca. 91344 ; ;----USE ^C TO EXIT TO CPM----- ; ;----USE ^P TO TOGGLE PARALLEL PRINTER OUTPUT---- ; (12K Print Buffering) ; ;----USE ^O TO OUTPUT AN ASSEMBLED PROGRAM TO THE ; Z8671 (ASHLEY'S ASMBZ8) ; ;----USE ^T TO RECONFIGURE TERMINAL COMMUNICATION CHARACTERISTICS--- ; ;----USE ^Z TO ERASE SCREEN--- ; ;****************************************************************************** ; ;ORIGINALLY WRITTEN FOR USE WITH THE MICROMINT ;Z8 DEDICATED CONTROLLER AND THE ; ; ALLEN ASHLEY ASMB Z8 CROSS ASSEMBLER ; 395 Sierra Madre Villa ; Pasadena, Calif. ; 91107 ; ; $75.00 as of 3/1/84 ; ; My gratitude extends to Mr. Ashley for being ;able to provide his excellent cross assembler ;in a format readable by My Osborne 1 DD. ; ;****************************************************************************** ; ;RS-232C WIRING DETAILS: ; ;OSBORNE RS232 MICROMINT Z8 ;2============= ------------------------2 ; = - ; =_ ; - = ;3<------------ =========================>3 ; ;7<-------------------------------------------->7 ; ;****************************************************************************** ; ; ; ORG 100H BDOS EQU 0005H SWPOS EQU 0EF08H ;USED FOR BANK SWITCH MASK1 EQU 01BH ;MASK OUT INCOMING ESCAPE SEQUENCE MASK2 EQU 07FH ;MASK OUT BIT 7 CR EQU 0DH ; LF EQU 0AH ; CLEAR EQU 26 ; ; ; ; ; ;************ OSBORNE 1 DD CONSOLE I/O ROUTINES ******************************* ; ; LXI D,MESSG1;TYPE SIGN ON MESSAGE MVI C,9 ; CALL BDOS ; MVI E,094H ;SET I/OBYTE MVI C,08H ; CALL BDOS ; MVI A,00H ;INITIALIZE PRINTER TOGGLE FLAG STA FLAG1 ; STA FLAG2 ; Z8671 LOAD ROUTINE FLAG STA PNTR ; PRINTER BUFFER POINTER STA PNTR+1 ; JMP INPUT ;BEGIN MONITOR PGM WITH KEYBOARD INPUT CHECK RCVD: LDA RCVDAT ;LOAD INCOMING DATA CPI 00H ; NEW DATA? JNZ NXT ;YES - SKIP PRINTER BUFFER ACTIVITY TEST LDA CNTR ;LOAD CURRENT NO ACTIVITY COUNT INR A ; INCREMENT COUNT STA CNTR ; SAVE VALUE CPI 80H ; RECENT ACTIVITY? JM INPUT ;YES - DON'T PRINT BUFFER YET LDA FLAG1 ;PRINTER OUTPUT DESIRED? CPI 00H ; JNZ PRINT ; YES - PRINT NOW JMP INPUT ; NO - GOTO KEYBOARD INPUT NXT: CPI MASK1 ;DON'T PRINT ESCAPE SEQUENCES JZ INPUT ; ANI MASK2 ;DON'T UNDERLINE STA RCVDAT ; SAVE THE MASKED INPUT VALUE MOV E,A ; TYPE INPUT TO SCREEN MVI C,2 ; CALL BDOS ; MVI A,00H ;CLEAR THE PRINTER ACTIVITY COUNTER STA CNTR ; LDA FLAG2 ;IS THE Z8671 LOAD SUBROUTINE RUNNING? CPI 00H ; RNZ ; YES - RETURN TO IT LDA FLAG1 ; IS THE OUPUT BEING PRINTED? CPI 00H ; JZ INPUT ; NO - GOTO INPUT LXI D,00H ;***** PRINTER BUFFERING ROUTINE ********************** LXI H,PBFFR ; LDA PNTR ; MOV E,A ; ADI 01H ; STA PNTR ; LDA PNTR+1 ; MOV D,A ACI 00H ; STA PNTR+1 ; DAD D ; XCHG ; # LDA RCVDAT ; STAX D ; JMP INPUT ; PRINT: LDA PNTR ;**** PRINTER OUTPUT ROUTINE *************** CPI 00H ; JZ INPUT ; LXI B,0H ; POUT: LXI H,PBFFR ; DAD B ; XCHG ; LDAX D ; INX B ; PUSH B ; MOV E,A ; MVI C,5 ; CALL BDOS ; POP B ; LDA PNTR ; SUI 01H ; STA PNTR ; JNZ POUT ; LDA PNTR+1 ; CPI 00H ; JZ NXT2 ; SUI 01H ; STA PNTR+1 ; MVI A,0FFH ; STA PNTR ; JMP POUT ; NXT2: MVI A,00H ; STA CNTR ;**** END PRINTER OUTPUT ROUTINE ********************** INPUT: MVI A,00H ;SET RECEIVED DATA STORAGE LOCATION STA RCVDAT ; TO 0 MVI C,06 ;CHECK MVI E,0FFH ; KEYBOARD CALL BDOS ; FOR INPUT CPI 00H ;ANY KEY DEPRESSED? JZ READ ; NO - READ I/O PORT INSTEAD CPI 03H ;^C RECEIVED? JZ 00H ; YES - WARM BOOT CPI 0FH ;^O RECEIVED? JZ ZLOAD ; YES - OFFLOAD RESIDENT COMPILED Z8 PROGRAM CPI 14H ;^T RECEIVED? JZ PSLCT ; YES - SELECT NEW TERMINAL CONFIGURATION STA XMTDAT ;STORE KEYBOARD INPUT RECEIVED CPI 10H ;^P RECEIVED? JZ PTGL ; YES - JUMP TO PRINTER TOGGLE CPI 1AH ;^Z RECEIVED? JZ CLRSC ; YES - JUMP TO CLEAR SCREEN STA XMTDAT ;STORE KEYBOARD INPUT TO BE SENT OUT JMP WRITE ;SEND OUT SERIAL I/O PTGL: LDA FLAG1 ;TOGGLE PRINTER OUTPUT FLAG XRI 01H ; STA FLAG1 ; JMP READ ;GO TO READ SERIAL I/O CLRSC: MOV E,A ;CLEAR SCREEN WHEN ^Z REC'D MVI C,2 ; CALL BDOS ; JMP READ ; ; ; ; ;****************************** Z8671 LOAD ROUTINE **************************** ; ; ; ZLOAD: LXI D,MESSG2 MVI C,9 CALL BDOS CALL BFREAD LXI D,MESSG3 MVI C,9 CALL BDOS CALL BFREAD LXI D,MESSG4 MVI C,9 CALL BDOS CALL BFREAD MVI A,0FFH STA FLAG2 POP H POP B POP D ZLOOP: MOV A,B ORA C JZ ENDZ INX D LDAX D CALL ZXMT INX H DCX B JMP ZLOOP ENDZ: MVI A,00H STA FLAG2 JMP INPUT BFREAD: LXI D,BUFFER MVI A,04H STA BUFFER MVI C, 0AH CALL BDOS LDA BUFFER+2 CALL XFRM2 RLC! RLC! RLC! RLC! ANI 0F0H MOV H,A LDA BUFFER+3 CALL XFRM2 ANI 0FH ORA H MOV H,A LDA BUFFER+4 CALL XFRM2 RLC! RLC! RLC! RLC! ANI 0F0H MOV L,A LDA BUFFER+5 CALL XFRM2 ANI 0FH ORA L MOV L,A XTHL PUSH H RET ZXMT: STA Z8DAT MVI A,40H STA XMTDAT CALL ZWRITE MVI A,25H STA XMTDAT CALL ZWRITE MOV A,H RLC! RLC! RLC! RLC! CALL XFRM STA XMTDAT CALL ZWRITE MOV A,H CALL XFRM STA XMTDAT CALL ZWRITE MOV A,L RLC! RLC! RLC! RLC! CALL XFRM STA XMTDAT CALL ZWRITE MOV A,L CALL XFRM STA XMTDAT CALL ZWRITE MVI A,3DH STA XMTDAT CALL ZWRITE MVI A,25H STA XMTDAT CALL ZWRITE LDA Z8DAT RLC! RLC! RLC! RLC! CALL XFRM STA XMTDAT CALL ZWRITE LDA Z8DAT CALL XFRM STA XMTDAT CALL ZWRITE MVI A,0DH STA XMTDAT CALL ZWRITE PUSH B PUSH D PUSH H EOL: MVI A,00H STA RCVDAT CALL READ LDA RCVDAT CPI 3AH JNZ EOL POP H POP D POP B RET ZWRITE: PUSH B PUSH D PUSH H CALL WRITE POP H POP D POP B RET XFRM: ANI 0FH ADI 30H CPI 3AH RC ADI 7H RET XFRM2: SUI 30H CPI 0AH RM SUI 07H RET PSLCT: LXI D,MESSG5 ;***** PROTOCALL SELECTION ROUTINE ******************* MVI C,9 CALL BDOS MVI C,1 CALL BDOS CPI 41H ;A? JZ PTA CPI 42H ;B? JZ PTB CPI 43H ;C? JZ PTC CPI 44H ;D? JZ PTD CPI 45H ;E? JZ PTE CPI 46H ;F? JZ PTF CPI 47H ;G? JZ PTG CPI 48H ;H? JZ PTH JMP INPUT PTA: MVI A,00H STA XMTDAT JMP BSLCT PTB: MVI A,04H STA XMTDAT JMP BSLCT PTC: MVI A,08H STA XMTDAT JMP BSLCT PTD: MVI A,0CH STA XMTDAT JMP BSLCT PTE: MVI A,10H STA XMTDAT JMP BSLCT PTF: MVI A,14H STA XMTDAT JMP BSLCT PTG: MVI A,18H STA XMTDAT JMP BSLCT PTH: MVI A,1CH STA XMTDAT BSLCT: LXI D,MESSG6 MVI C,9 CALL BDOS MVI C,1 CALL BDOS CPI 41H ;A? JZ PTA2 CPI 42H ;B? JZ PTB2 JMP INPUT PTA2: LDA XMTDAT ORI 41H STA XMTDAT JMP PTC2 PTB2: LDA XMTDAT ORI 42H STA XMTDAT PTC2: LXI D,MESSG7 MVI C,9 CALL BDOS JMP PWRITE ; ; ; ; ;****************************************************************************** ; ; ; ; MESSG1: DB CLEAR,'OSBORNE 1 TERMINAL EMULATION PROGRAM',CR,LF,LF DB 'Use ^C to exit to CP/M',CR,LF DB ' ^P to toggle buffered printer output',CR,LF DB ' ^O to load an assembled Z8 program',CR,LF DB ' ^T to reconfigure terminal',CR,LF DB ' ^Z to clear screen',CR,LF DB CR,LF,' Mark Aaldering- - 3/84',CR,LF,'$' MESSG2: DB CLEAR,'Hex Loc. in OSBORNE memory of pgm (####) ?',CR,LF,LF,'$' MESSG3: DB CLEAR,'Program Length (Hex Bytes, ####) ?',CR,LF,LF,'$' MESSG4: DB CLEAR,'Load to Z8 memory @% (Hex ####) ?',CR,CR,LF,'$' MESSG5: DB CLEAR,'Protocol Selection',CR,LF,LF DB 'A . . 7 Bits + Even Parity + 2 Stop bits',CR,LF,LF DB 'B . . 7 Bits + Odd Parity + 2 Stop bits',CR,LF,LF DB 'C . . 7 Bits + Even Parity + 1 Stop bit',CR,LF,LF DB 'D . . 7 Bits + Odd Parity + 1 Stop bit',CR,LF,LF DB 'E . . 8 Bits + 2 Stop bits',CR,LF,LF DB 'F . . 8 Bits + 1 Stop bit',CR,LF,LF DB 'G . . 8 Bits + Even Parity + 1 Stop bit',CR,LF,LF DB 'H . . 8 Bits + Odd Parity + 1 Stop bit',CR,LF,'$' $ MESSG6: DB CLEAR,'Baud Rate Selection',CR,LF,LF DB 'A . . 1,200 Baud',CR,LF,LF DB 'B . . 300 Baud',CR,LF,LF,'$' MESSG7: DB CLEAR,' ....terminal reconfigured....',CR,LF,'$' ; ; ; ; ;****************************************************************************** ; ; ; ; FLAG1 DS 01 ;PRINTER OUTPUT TOGGLE FLAG FLAG2 DS 01 ;Z8671 LOAD ROUTINE FLAG Z8DAT DS 01 ;Z8 STORAGE LOCATION BUFFER DS 06 ;INPUT LINE BUFFER PNTR DS 02 ;PRINTER BUFFER LOC. OFFSET CNTR DS 01 ;# OF READS W/NO NEW INFORMATION RETURNED PBFFR DS 3000H ;PRINTER BUFFER MEMORY(256 CHAR.) ; ; ; ; ;******* OSBORNE 1 MC6850 INTERFACE ADAPTER I/O ROUTINES ********************** ; ; ; ; ORG 4000H; COMMON BLOCK OF OSBORNE 1 MEMORY RCVDAT DS 1 ; BETWEEN BANK1 & BANK2-- ALL SERIAL XMTDAT DS 1 ; I/O MUST BE DONE IN BANK2!!! ; WRITE: CALL SWITCH LDA 2A00H ANI 02H JZ WRITE LDA XMTDAT ANI MASK2 STA 2A01H DUPLEX: LDA 2A00H ANI 01H JZ DUPLEX LDA 2A01H STA RCVDAT CALL RETURN JMP RCVD READ: CALL SWITCH LDA 2A00H ANI 01H JZ ENDR LDA 2A01H STA RCVDAT ENDR: CALL RETURN JMP RCVD PWRITE: CALL SWITCH LDA XMTDAT STA 2A00H CALL RETURN JMP INPUT SWITCH: DI ;SWITCH TO BANK2 MEMORY OUT 00H MVI A,00H STA SWPOS RET RETURN: OUT 01H ;SWITCH TO BANK1 MEMORY MVI A,01H STA SWPOS EI RET END ;******************************************************************************NFORMATION RETURNED PBFFR DS 3000H ;PRINTER BUFFER MEMORY(256 CHAR.) ; ; ; ; ;******* OSBORNE 1 MC6850 INTERFACE ADAPTER I/O ROUTINES ********************** ; ; ; ; ORG 4000H; COMMON BLOCK OF OSBORNE 1 MEMORY RCVDAT DS 1 ; BETWEEN BANK1 & BANK2-- ALL SERIAL XMTDAT DS 1 ; I/O MUST BE DONE IN BANK2!!! ; WRITE: CALL SWITCH LDA 2A00H ANI 02H JZ WRITE LDA XMTDAT ANI MASK2 STA 2A01H DUPLEX: LDA 2A00H ANI 01H JZ DUPLEX LDA 2A01H STA RCVDAT CALL RETURN JMP RCVD REAMARK AALDERING 12301 LUNA PL. GRANADA HILLS, CA 91344 FOG MEMBER # 3927 TERMNL.AS͠ i a 808 assembl languag progra tha allow a Osborn t emulat standar ASCI terminal Th progra wa writte a consequenc o m nee fo stan alon termina fo th Ciarci Z controlle (Au '8 BYTE) Initially ɠ borrowe neighbor' Dat Genera DASHEҠ terminal whic prove entirel satifactory However whe purchase cros assemble tha woul ru o m Osborn fro Alle Ashley i becam readil apparen tha i woul b mor convenien i singl machin coul handl everything Severa day ( nights an countles reference t th Osborn technica manual an "Sou o CP/M (a excellen al aroun boo availabl fro SAMS yielded this program. With it you can: 1 Ech th scree displa t paralle printe wit th integral 12k print buffer. 2. Set the Communication Protocal & Baud rate at any time. 3 Downloa a assemble Z867 progra tha reside i th Osborne' memor vi seria byt strea directl int th Z8671 (Thi assume tha yo hav use Mr Ashley' progra t assembl th progra befor enterin th termina program Th program should be left in O1 memory at or above 5000h) 4. Clear the screen with a ^Z. 5. Exit to CP/M with a ^C. Th progra sign o wit lis o th ^command accepted an i men driv fo th variou options Th Offloa optio fo th Z867 i o interes onl t thos intereste i usin thie Osborne a stan alon developmen station fo thi popula singl chi microcomputer A th I/ routine mus b i th commo banke memor 4000H th progra whe loade occupie 16k eve thoug th .AS fil i muc smaller Therefor ther i n advantag i removin th Offloa option larg portio o th empt spac i use fo printe buffering creatin 12k buffer area. T anyon wh require stan alon terminal thi progra should be a blessing, Enjoy, Mark Aalderingna program Th program should be left in O1 memory at or above 5000h) 4. Clear the screen with a ^Z. 5. Exit to CP/M with a ^C. Th progra sign o wit lis o th ^command accepted an i men driv fo th variou options Th Offloa optio fo th Z867 i o interes onl t thos intereste i usin thie Osborne a stan alon developmen station fo thi popula singl chi microcomputer A th I/ routine mus b i th commo banke memor 4000H th progra whe loade occupie 16k eve thoug th .AS fil i muc smaller Therefor ther i n advantag i removin th Offloa option larg portio o th empt spac i use fo printe buffering creatin 12k buffer ar%;PROGRAM TO CHANGE THE I/O BYTE SUCH THAT ;THE LIST DEVICE ON THE OSBORNE-1 IS ALTERNATED ;BETWEEN THE SERIAL PORT AND THE PARALLEL (CENTRONICS) ;PORT ; ;WRITTEN BY KENT WALKER, AUGUST, 1982 ; ; ORG 100H IOBYTE EQU 0003H CR EQU 0DH LF EQU 0AH HT EQU 09H PRBUFF EQU 09H BDOS EQU 0005H REBOOT EQU 0000H MASK EQU 11000000B LDA IOBYTE XRI MASK STA IOBYTE JM SERIAL LXI D,PARMSG JMP PRNT SERIAL: LXI D,SERMSG PRNT: MVI C,PRBUFF JMP BDOS JMP REBOOT ; SERMSG: DB CR,LF,LF,LF,HT,'SERIAL Printer Selected',CR,LF,LF,'$' PARMSG: DB CR,LF,LF,LF,HT,'PARALLEL Printer Selected',CR,LF,LF,'$' ; END  This is the release date of the disk. -CPM103 DOC NEWROM DOC oOREMOTE AQM p!OSBDSCIOC yOS-CIO OSB  OSMDIO C OSBLINK MAC OZZYBAUDCOM OZZYBAUDC OZZYTIMECOM ROMDUMP COM ROMDUMP MAC SCPRT2 COM SCPRT2 MAC DATE .DOC D8 26 11264 88 EPOSLNK .COM 2C 74 3072 24 EPOSLINK.DOC E0 C9 1664 13 GD .COM 90 47 8064 63 GD .PAS CB 06 256 2 NEWROM .COM 47 08 21888 171 NEWROM .DOC B6 B6 512 4 OREMOTE .AQM E5 73 8576 67 OSBDSCIO.C F5 C3 5632 44 OS-CIO .OSB 37 AC 3200 25 OSMDIO .C E1 2A 3840 30 OSBLINK .MAC D0 58 3200 25 OZZYBAUD Fog Library Disk FOG-CPM.103 Copyright (1986) by Fog International Computer Users Group to the extent not copyrighted by the original author for the exclusive use and enjoyment of its members. Any reproduction or distribution for profit or personal gain is strictly forbidden. For information, contact FOG, P. O. Box 3474, Daly City, CA. 94015-0474. as part of the description of a file indicates that the program is distributed on a "try first, pay if you like it" basis. If you find the program(s) meet your need, please refer to the author's documentation for information on becoming a registered user. Only by registering and paying for the programs you like and use will the authors of such programs continue development. Often, more complete documentation, additional modules, and new releases are available only to registered users. Misc. Osborne 1 Programs. Filename Description -07-00 .86 This is the release date of the disk. -CPM103 .DOC This is the description of the disk contents. CPMDEC .FTN CC6A 16K [CPM-DEC 1 of 2] Fortran program for DEC PDP computer running RSX that allows XMODEM checksum compatible file transfers. CPMDEC .DOC FF30 1K [CPM-DEC 2 of 2] CTERM .COM C9D2 8K [CTERM 1 of 3] Simple Osborne 1 terminal (modem communications) program. BDS 'C' source is included. CTERM .DOC CDC4 3K [CTERM 2 of 3] CTERM .C 80D2 7K [CTERM 3 of 3] DATE .COM 2D74 1K [Date 1 of 5] Stores a date in low memory that can be accessed even after a reset. For the Osborne 1. MAC source is included. DATE .MAC F050 13K [Date 2 of 5] DATE2 .COM E7D4 1K [Date 3 of 5] DATE2 .MAC 910E 11K [Date 4 of 5] DATE .DOC D826 11K [Date 5 of 5] EPOSLNK .COM 2C74 3K [EPSON-OS1 Link 1 of 2]  Allows an Osborne 1 to easily connect with an Epson PX-8 (Geneva) with a FILINK compatible program. EPOSLINK.DOC E0C9 2K [EPSON-OS1 Link 2 of 2] GD .COM 9047 8K [Date 1 of 2] Reads date set by DATE. Turbo Pascal source included. GD .PAS CB06 1K [Get Date 2 of 2] NEWROM .COM 4708 22K [NEWROM 1 of 2] Will extract the Osborne 1 monitor ROM to a disk file. NEWROM .DOC B6B6 1K [NEWROM 2 of 2] OREMOTE .AQM E573 9K Squeezed ASseMbler source for a program to attach a remote console through the serial port. OSBDSCIO.C F5C3 6K BDS 'C' console I/O routines. OS-CIO .OSB 37AC 4K BDS 'C' console I/O include file. OSMDIO .C E12A 4K BDS 'C' modem I/O routines for Osborne 1. OSBLINK .MAC D058 4K MAC source for a program which patches the Osborne 1 BIOS so that the cursor will blink. OZZYBAUD.COM 954D 3K [OZZYBAUD 1 of 2] & Sets the Osborne 1 serial port baud rate. 'C' source included OZZYBAUD.C 4482 2K [OZZYBAUD 2 of 2] OZZYTIME.COM 3C0A 5K Display the time and date on your machine. ROMDUMP .COM B46C 1K [ROM & Screen Dump 1 of 2] Copies the Osborne 1 monitor ROM into memory. MAC source is included. ROMDUMP .MAC BE8B 2K [ROM & Screen Dump 2 of 5] SCPRT2 .COM E38A 1K [ROM & Screen Dump 3 of 5] Osborne 1 screen dump utility. MAC source is included. SCPRT2 .MAC 7E2B 1K [ROM & Screen Dump 4 of 5] OZSTUF .DOC 1A36 3K [ROM & Screen Dump 5 of 5] TERMNL2 .ASM 52E6 10K ver. 2 [Terminal 1 of 2] ASseMbler source for a very simple ASCII terminal emulator for the Osborne 1. (modem communications) TERMNL2 .DOC 36F6 3K ver. 2 [Terminal 2 of 2] TOGGLE .ASM 2550 1K Change the LST: device between the serial and parallel ports. re'