diff --git a/2006/toledo2/.gitignore b/2006/toledo2/.gitignore index 3579258bf..acebdef02 100644 --- a/2006/toledo2/.gitignore +++ b/2006/toledo2/.gitignore @@ -1,28 +1,4 @@ -A -ADVENTUR/ -B -BASICS/ -C -CPM64.COM -DBASEII/ -GAMES/ -KAYPROII.ZIP -KERMIT/ -MASTER/ -MFDISK/ -MODEM7/ -PRO8/ -SOURCE/ -THE-WORD/ -TINKER/ -WS33-1/ -WS33-2/ -WS33-KPR/ -WS33/ toledo2 toledo2.alt -DDT.COM -*.COM -*.ASM toledo2.orig prog.orig diff --git a/2006/toledo2/A b/2006/toledo2/A new file mode 100644 index 000000000..a5766f288 Binary files /dev/null and b/2006/toledo2/A differ diff --git a/2006/toledo2/ADVENTUR/ADV.COM b/2006/toledo2/ADVENTUR/ADV.COM new file mode 100644 index 000000000..5e9eebe81 Binary files /dev/null and b/2006/toledo2/ADVENTUR/ADV.COM differ diff --git a/2006/toledo2/ADVENTUR/ADVI.DAT b/2006/toledo2/ADVENTUR/ADVI.DAT new file mode 100644 index 000000000..1eea9f19d Binary files /dev/null and b/2006/toledo2/ADVENTUR/ADVI.DAT differ diff --git a/2006/toledo2/ADVENTUR/ADVI.PTR b/2006/toledo2/ADVENTUR/ADVI.PTR new file mode 100644 index 000000000..2887a38e2 Binary files /dev/null and b/2006/toledo2/ADVENTUR/ADVI.PTR differ diff --git a/2006/toledo2/ADVENTUR/ADVT.DAT b/2006/toledo2/ADVENTUR/ADVT.DAT new file mode 100644 index 000000000..0dd847bed Binary files /dev/null and b/2006/toledo2/ADVENTUR/ADVT.DAT differ diff --git a/2006/toledo2/ADVENTUR/ADVT.PTR b/2006/toledo2/ADVENTUR/ADVT.PTR new file mode 100644 index 000000000..edb1deaad Binary files /dev/null and b/2006/toledo2/ADVENTUR/ADVT.PTR differ diff --git a/2006/toledo2/ADVENTUR/DECODE.DAT b/2006/toledo2/ADVENTUR/DECODE.DAT new file mode 100644 index 000000000..a6838345c Binary files /dev/null and b/2006/toledo2/ADVENTUR/DECODE.DAT differ diff --git a/2006/toledo2/ASM.COM b/2006/toledo2/ASM.COM new file mode 100644 index 000000000..a6a54da56 Binary files /dev/null and b/2006/toledo2/ASM.COM differ diff --git a/2006/toledo2/B b/2006/toledo2/B new file mode 100644 index 000000000..a5766f288 Binary files /dev/null and b/2006/toledo2/B differ diff --git a/2006/toledo2/BASICS/ALIENS.COM b/2006/toledo2/BASICS/ALIENS.COM new file mode 100644 index 000000000..8db719d42 Binary files /dev/null and b/2006/toledo2/BASICS/ALIENS.COM differ diff --git a/2006/toledo2/BASICS/BLKJK.BAS b/2006/toledo2/BASICS/BLKJK.BAS new file mode 100644 index 000000000..148d421a0 Binary files /dev/null and b/2006/toledo2/BASICS/BLKJK.BAS differ diff --git a/2006/toledo2/BASICS/CATCHUM.COM b/2006/toledo2/BASICS/CATCHUM.COM new file mode 100644 index 000000000..b12828641 Binary files /dev/null and b/2006/toledo2/BASICS/CATCHUM.COM differ diff --git a/2006/toledo2/BASICS/CATCHUM.DAT b/2006/toledo2/BASICS/CATCHUM.DAT new file mode 100644 index 000000000..f8f4ba899 Binary files /dev/null and b/2006/toledo2/BASICS/CATCHUM.DAT differ diff --git a/2006/toledo2/BASICS/CHASE.BAS b/2006/toledo2/BASICS/CHASE.BAS new file mode 100644 index 000000000..b2e65e8ee Binary files /dev/null and b/2006/toledo2/BASICS/CHASE.BAS differ diff --git a/2006/toledo2/BASICS/HORSE.BAS b/2006/toledo2/BASICS/HORSE.BAS new file mode 100644 index 000000000..bd1da5555 Binary files /dev/null and b/2006/toledo2/BASICS/HORSE.BAS differ diff --git a/2006/toledo2/BASICS/LADDER.COM b/2006/toledo2/BASICS/LADDER.COM new file mode 100644 index 000000000..9d052fe4c Binary files /dev/null and b/2006/toledo2/BASICS/LADDER.COM differ diff --git a/2006/toledo2/BASICS/LADDER.DAT b/2006/toledo2/BASICS/LADDER.DAT new file mode 100644 index 000000000..6ddacf12d Binary files /dev/null and b/2006/toledo2/BASICS/LADDER.DAT differ diff --git a/2006/toledo2/BASICS/MBASIC.COM b/2006/toledo2/BASICS/MBASIC.COM new file mode 100644 index 000000000..c9ec3cd39 Binary files /dev/null and b/2006/toledo2/BASICS/MBASIC.COM differ diff --git a/2006/toledo2/BASICS/OBASIC.COM b/2006/toledo2/BASICS/OBASIC.COM new file mode 100644 index 000000000..4b3838e10 Binary files /dev/null and b/2006/toledo2/BASICS/OBASIC.COM differ diff --git a/2006/toledo2/BASICS/PIP.COM b/2006/toledo2/BASICS/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/BASICS/PIP.COM differ diff --git a/2006/toledo2/BASICS/ROCKET.BAS b/2006/toledo2/BASICS/ROCKET.BAS new file mode 100644 index 000000000..90ece7172 Binary files /dev/null and b/2006/toledo2/BASICS/ROCKET.BAS differ diff --git a/2006/toledo2/BASICS/STRTRK.BAS b/2006/toledo2/BASICS/STRTRK.BAS new file mode 100644 index 000000000..265e98bda Binary files /dev/null and b/2006/toledo2/BASICS/STRTRK.BAS differ diff --git a/2006/toledo2/BASICS/TRADE.BAS b/2006/toledo2/BASICS/TRADE.BAS new file mode 100644 index 000000000..dbde74575 Binary files /dev/null and b/2006/toledo2/BASICS/TRADE.BAS differ diff --git a/2006/toledo2/BASICS/WUMP.BAS b/2006/toledo2/BASICS/WUMP.BAS new file mode 100644 index 000000000..62c301bce Binary files /dev/null and b/2006/toledo2/BASICS/WUMP.BAS differ diff --git a/2006/toledo2/BAUD.COM b/2006/toledo2/BAUD.COM new file mode 100644 index 000000000..f7fd7bb5a Binary files /dev/null and b/2006/toledo2/BAUD.COM differ diff --git a/2006/toledo2/C b/2006/toledo2/C new file mode 100644 index 000000000..c0ac92263 Binary files /dev/null and b/2006/toledo2/C differ diff --git a/2006/toledo2/CONFIG.ASM b/2006/toledo2/CONFIG.ASM new file mode 100644 index 000000000..4f9eef1db --- /dev/null +++ b/2006/toledo2/CONFIG.ASM @@ -0,0 +1,1256 @@ +false equ 0 +true equ not false +debug equ false + .list ;begin listing +title KAYPRO CONFIG (custom configuration utility program) 2.0 Copyright (C) 1982 NLS, Inc. +page +;############################################################### +;## KAYPRO II CONFIG PROGRAM ## +;## containing within it the new cbios image so that ## +;## if this is run against a disk with the old cbios ## +;## it is updated at the same time. ## +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 11,1982 ## +;## by jim nickerson ## +;## -allow redefinition of cursor keys ## +;## -allow redifinition of keypad keys ## +;## -allow redefinition of default i/o byte ## +;## -allow changing of the baud rate ## +;## -write these changes to disk ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + +; +; begining of the config program +; + jp config ;begining of program +; +mprint: + ld a,(de) ;get char + cp 0FFH ;end + ret z ;finished + push de + ld c,2 + ld e,a + call 5 + pop de + inc de + jr mprint +; +sprint macro arg + ld de,arg ;pointer to print line + call mprint + endm +; +; +printone macro + push af ;save char + ld c,2 ;console output + ld e,a ;char + call 5 + pop af ;recover char + endm +; +; +inone macro + local loop +loop: + ld c,6 ;direct console input + ld e,0FFH + call 5 + cp 0 ;0=nochar + jr z,loop ;wait for char + endm +; +; +jmpif macro arg, adr + cp arg + jp z, adr + endm +; +;print a message using bdos call +cr equ 0DH +lf equ 0AH +uprint macro x + ld c,9 + ld de,x ;message pointer + call 5 ;pass it to bdos + endm +; +;get a char from the console, up case +input macro + ld c,1 ;console input + call 5 ;pass it to bdos + endm +; +;*************************************************************** +;*************************************************************** +; +config: ;begining of the config program with main menu +; +;**************************************************************** +;**************************************************************** +; + ld a,1 + ld (disk),a ;force drive B + ld a,0FFH + ld (change),a ;changes flag 0=yes some changes +; +first: + uprint menuheader + uprint menu0 + input ;get an answer + push af ;save char + uprint crlf + pop af + jmpif '1',setio ;menu1 + jmpif '2',setwr ;menu2 + jmpif '3',setcur ;menu3 + jmpif '4',setnum ;menu4 + jmpif '5',setbaud ;menu5 + jmpif 01BH,go$out + jp first +; +setbaud: + uprint menuheader + uprint menu5 + input + push af + uprint crlf + pop af + jmpif '1',hbaud + jmpif 01BH,first + jmpif '2',dobaud + jp setbaud +; +dobaud: + uprint baudinst +dob1: + ld a,0 + ld (curline),a ;which choice + uprint firstchoice +dob2: + inone ;get a key + cp 01BH + jr z,setbaud + cp lf + jp z,db1 + cp cr + jr nz,dob2 + ;was a cr so we have a choice + ld a,(curline) + cp 16 ;wants to exit + jp nc,dob2 + out (0),a ;set baud rate + jp setbaud +; +db1: + ld a,(curline) ;where are we + inc a ;bump pointer + ld (curline),a ;save for future use + cp 17 ;end of choices + jr z,dob1 + uprint nextline ;advance one line + jr dob2 ;next line +curline: defb 0 +baudinst: + defb 1AH + defb ' 50',cr,lf + defb ' 75',cr,lf + defb ' 110 Move the cursor to the baud rate which',cr,lf + defb ' 134.5',cr,lf + defb ' 150 you want to use by typing the [LINE FEED] key.',cr,lf + defb ' 300',cr,lf + defb ' 600',cr,lf + defb ' 1200 When the cursor is at the rate you want',cr,lf + defb ' 1800',cr,lf + defb ' 2000 type the RETURN key and it will be set.',cr,lf + defb ' 2400',cr,lf + defb ' 3600 The new baud rate will be effective now.',cr,lf + defb ' 4800',cr,lf + defb ' 7200',cr,lf + defb ' 9600',cr,lf + defb '19200',cr,lf + defb 'Type [ESC] key to return to the previous menu (no changes)',cr,lf + defb cr,lf,lf + defb '(* NOTE: The baud rate will always default to 300 baud *)',cr,lf + defb '(* after the power is first turned on and when *)',cr,lf + defb '(* the RESET button is pressed. *)',cr,lf + defb '$' +firstchoice: + 01EH,0CH,0CH,0CH,0CH,0CH,'$' +nextline: + 0AH,'$' +; +hbaud: ;tell him about baud rates + uprint baudmsg + uprint crtocont + input + jp setbaud +; +setnum: + uprint menuheader + uprint menu4 + input + push af + uprint crlf + pop af + jmpif '1',hnum + jmpif '2',donum + jmpif 01BH,first + jp setnum +; +getone: + ld a,(curline) + inc a + ld (curline),a ;bumped pointer + call hex2in ;get 2 hex chars in c + jr nz,gadj +;wants to exit maybe + cp lf ;move cursor + ret z + ;must be esc then + pop hl ;clean stack + ld hl,(gohere) + jp (hl) ;oblidge him + ret z +;adjust changes flag +gadj: + ld a,0 + ld (change),a ;yes some changes +; +;record changes in mem image of cbios + ld de,0 + ld a,(curline) ;put here -1 + dec a + ld e,a + ld hl,(puthere) ;where to put changes + add hl,de ;hl points to char + ld a,c ;get char + ld (hl),a ;put him in mem + ret +; +; get two hex chars +hex2in: + inone ;get one key + cp 0AH ;move to next position + ret z + cp 01BH + ret z ;exit on esc + cp 030H ;0 the lowest one allowed + jr c,hex2in + cp 03AH ;tween 0 and 9 + jr c,setone + res 5,a ;make upper case if lower + cp 047H ;F the highest allowed + jr nc,hex2in + cp 041H ;must not be less than A + jr c,hex2in + printone + sub 7 ;remove bias + jr seta +setone: + printone +seta: + sub 030H ;take off bias + rlc a ;slowly + rlc a ;shift the + rlc a ;low nible + rlc a ;to the high nible + and 0F0H ;mask off the low nible + push af ;save it +settwo: ;force him to enter second char in hex + inone ;get one key + cp 0AH + jr z,s2 + cp 01BH + jr nz,s3 +s2: + pop hl ;clean stack + ret ;with z set to exit +s3: + cp 030H + jr c,settwo ;not acceptable + cp 03AH ;tween 0-9 + jr c,set3 + res 5,a ;make upper case if lower + cp 047H + jr nc,settwo ;not acceptable + cp 041H + jr c,settwo ;nogood + printone + sub 7 ;remove bias + jr set4 +set3: ;got second char in hex + printone +set4: + sub 030H + and 0FH ;ONLY WANT LOW NIBLE + ld c,a ;save it + pop af ;recover high nible + or c ;assembled char + ld c,a ;save char in a + ret nz + inc a ;must ret not zero + ret +; +; +donum: + ld hl,setnum + ld (gohere),hl ;where to exit to on esc + ld hl,cbios+039H + ld (puthere),hl + uprint numchoices +donum1: + ld a,0 ;first choice + ld (curline),a + sprint key0 + call getone + sprint key1 + call getone + sprint key2 + call getone + sprint key3 + call getone + sprint key4 + call getone + sprint key5 + call getone + sprint key6 + call getone + sprint key7 + call getone + sprint key8 + call getone + sprint key9 + call getone + sprint key10 ;- + call getone + sprint key11 ;, + call getone + sprint key12 ;enter + call getone + sprint key13 ;. + call getone + sprint key14 ;return +numpat: + inone + cp 01BH ;ESC + jp z,setnum + cp lf + jr nz,numpat + jp donum1 +; +numchoices: + defb 01AH + defb '----------------------------- Move the cursor to the key you wish',cr,lf + defb ': : : : :',cr,lf + defb ': 7 : 8 : 9 : - : to change. Use the [LINE FEED] key.',cr,lf + defb ': : : : :',cr,lf + defb ': 37 : 38 : 39 : 2D : The default HEXADECIMAL code will be',cr,lf + defb ';------;------;------;------:',cr,lf + defb ': : : : : the number which is flashing.',cr,lf + defb ': 4 : 5 : 6 : , :',cr,lf + defb ': : : : :',cr,lf + defb ': 34 : 35 : 36 : 2C : When you reach the key you wish to change.',cr,lf + defb ':------:------:------:------:',cr,lf + defb ': : : : : Type in the new HEXADECIMAL code.',cr,lf + defb ': 1 : 2 : 3 : :',cr,lf + defb ': : : : :',cr,lf + defb ': 31 : 32 : 33 : ENTER: (* NOTE: you must enter both digits *)',cr,lf + defb ':------:------:------: :',cr,lf + defb ': : : 0D : (* to change the code. *)',cr,lf + defb ': 0 : . : :',cr,lf + defb ': : : :',cr,lf + defb ': 30 : 2E : : Type the [ESC] key to return to the previous menu',cr,lf + defb '-----------------------------',cr,lf + defb '$' +; +key0: defb 01BH,'=',19+20H,6+20H,0FFH +key1: defb 01BH,'=',14+20H,3+20H,0FFH +key2: defb 01BH,'=',14+20H,10+20H,0FFH +key3: defb 01BH,'=',14+20H,17+20H,0FFH +key4: defb 01BH,'=',9+20H,3+20H,0FFH +key5: defb 01BH,'=',9+20H,10+20H,0FFH +key6: defb 01BH,'=',9+20H,17+20H,0FFH +key7: defb 01BH,'=',4+20H,3+20H,0FFH +key8: defb 01BH,'=',4+20H,10+20H,0FFH +key9: defb 01BH,'=',4+20H,17+20H,0FFH +key10: defb 01BH,'=',4+20H,24+20H,0FFH +key11: defb 01BH,'=',9+20H,24+20H,0FFH +key12: defb 01BH,'=',16+20H,24+20H,0FFH +key13: defb 01BH,'=',19+20H,17+20H,0FFH +key14: defb 01BH,'=',19+20H,41+20H,0FFH +hnum: + uprint nummsg + uprint crtocont + input + jp setnum +; +setcur: + uprint menuheader + uprint menu3 + input + push af + uprint crlf + pop af + jmpif '1',hcur + jmpif 01BH,first + jmpif '2',docur + jr setcur +; +; +docur: + ld hl,cbios+035H ;WHERE TO PUT CHANGES + ld (puthere),hl + ld hl,setcur + ld (gohere),hl ;ret here on esc + uprint curinst +doc1: + ld a,0 + ld (curline),a ;item to change + sprint cur0 ;left cursor key + call getone ;input etc + sprint cur1 + call getone + sprint cur2 + call getone + sprint cur3 + call getone + sprint cur4 ;type esc to exit +doc4: + inone ;get one key + cp 0AH + jp z,doc1 + cp 01BH + jr nz,doc4 + jp setcur +; + jp doc1 ;again +hcur: + uprint vecmsg + uprint crtocont + input + jp setcur +; +; +curinst: + defb 01AH + defb cr,lf + defb cr,lf + defb ' ---------------------------------',cr,lf + defb ' : : : : :',cr,lf + defb ' : ^ : : : <- : -> :',cr,lf + defb ' : : : v : : :',cr,lf + defb ' : : : : :',cr,lf + defb ' : 0B : 0A : 08 : 0C :',cr,lf + defb ' ---------------------------------',cr,lf + defb cr,lf + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb ' Move the cursor to the key which you wish to change by pressing',cr,lf + defb ' the [LINE FEED] key. The default HEXADECIMAL code will be the flashing number.',cr,lf + defb ' Type the new HEXADECIMAL number you wish to assign to the key.',cr,lf + defb cr,lf + defb ' You must type both digits to effect the change.',cr,lf + defb cr,lf + defb '$' +; +cur0: defb 01BH,'=',7+20H,15+20H,0FFH +cur1: defb 01BH,'=',7+20H,23+20H,0FFH +cur2: defb 01BH,'=',7+20H,31+20H,0FFH +cur3: defb 01BH,'=',7+20H,39+20H,0FFH +cur4: defb 01BH,'=',11+20H,18+20H,0FFH +setwr: + uprint menuheader + uprint menu2 + input + push af + uprint crlf + pop af + jmpif '1',hwr + jmpif '2',dowr + jmpif 01BH,first + jp setwr +; +dowr: + uprint wrinst +dow0: + sprint wr0 + inone + cp 0AH + jr z,dow1 + cp 01BH + jp z,setwr + cp 0DH + jr nz,dow0 +;got cr so do it set yes + ld a,0FFH ;set it on + ld (cbios+034H),a + ld a,0 + ld (change),a + jp setwr +dow1: + sprint wr1 + inone + cp lf + jr z,dow2 + cp 01BH + jr z,setwr + cp cr + jr nz,dow1 +;have choice set = 0 + ld a,0 + ld (cbios+034H),a + ld (change),a + jp setwr +dow2: + sprint wr2 + inone + cp 01BH + jp z,setwr + cp lf + jp nz,dow2 + jp dow0 +; +; +hwr: + uprint safmsg + uprint crtocont + input + jp setwr +; +wrinst: + defb 01AH,cr,lf + defb cr,lf,cr,lf + defb 'Yes I want Write Safe enabeled.',cr,lf + defb cr,lf + defb 'No do not enable Write Safe. This is the default mode on your KAYPRO II .',cr,lf + defb cr,lf + defb 'Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf,cr,lf + defb 'Use the [LINE FEED] key to move the cursor to the mode',cr,lf + defb 'which you wish to use and then type the [RETURN] key to',cr,lf + defb 'enter your choice.',cr,lf + defb cr,lf + defb '**** PLEASE read the help file before you enable Write Safe. ****',cr,lf + defb '**** If you do not understand it ASK your dealer. ****',cr,lf + defb '$' +; +wr0: defb 01BH,'=',3+20H,20H,0FFH +wr1: defb 01BH,'=',5+20H,20H,0FFH +wr2: defb 01BH,'=',7+20H,11+20H,0FFH +; +setio: + uprint menuheader + uprint menu1 + input ;get response + push af + uprint crlf + pop af + jmpif '1',hio + jmpif '2',doio + jmpif 01BH,first + jp setio +; +doio: + uprint ioinst + ld hl,cbios+033H + ld (puthere),hl + ld hl,setio + ld (gohere),hl +doio0: + ld a,0 + ld (curline),a + sprint io0 + call inio + sprint io1 + call inio +doioc: sprint io2 + call inio + sprint io3 + call inio +doioe: sprint io4 +doio1: + inone + cp 01BH + jp z,setio + cp 0AH + jr nz,doio1 + jp doio0 +; +inio: + inone ;get a char + cp 01BH + jr nz,inio1 + pop hl + ld hl,(gohere) + jp (hl) +inio1: + cp 0AH + jr nz,inio2 +;have line feed so bump cur line before returning + ld a,(curline) + inc a + ld (curline),a + ret +inio2: + cp 0DH + jr nz,inio +; must have a cr now process it + ld a,0 + ld (change),a ;yes some changes + ld a,(curline) + add a,a + ld de,0 + ld e,a + ld hl,ivtab + add hl,de ;hl now points to 1 of 4 + ld e,(hl) + inc hl + ld d,(hl) + ex de,hl + ld de,(puthere) ;where it goes + jp (hl) +ivtab: defw sio0 + defw sio1 + defw sio2 + defw sio3 +sio0: + ld a,(de) + res 1,a + set 0,a + ld (de),a + ld hl,doioc + ld a,2 + ld (curline),a + pop de + jp (hl) +sio1: + ld a,(de) + res 0,a + res 1,a + ld (de),a + ld a,(curline) + inc a + ld (curline),a + ret +sio2: + ld a,(de) + res 6,a + set 7,a + ld (de),a + ld hl,doioe + jp (hl) +sio3: + ld a,(de) + res 7,a + res 6,a + ld (de),a + ret +; +; +hio: + uprint iomsg + uprint crtocont + input + jp setio +; +; +ioinst: + defb 01AH + defb cr,lf,cr,lf + defb ' Default settings Posibile changes',cr,lf + defb ' ---------------- ----------------',cr,lf + defb cr,lf + defb ' CON:=CRT: CON:=TTY: Type the [LINE FEED] key to ',cr,lf + defb ' LST:=LPT: LST:=TTY: move the cursor to the mode ',cr,lf + defb ' PUN:=TTY: - none - you wish to select.',cr,lf + defb ' RDR:=TTY: - none - Then the RETURN key to enter',cr,lf + defb ' your selection.' + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb '* CON: If you chose CON:=TTY: then all input and output will be through the',cr,lf + defb ' serial connector on the back of your KAYPRO II instead of through the',cr,lf + defb ' keyboard and the CRT.',cr,lf + defb cr,lf + defb cr,lf + defb '* LST: This setting will decide wether the output directed at a printer',cr,lf + defb ' will go through the LPT: (parallel connector) or to the',cr,lf + defb ' TTY: (serial connector).',cr,lf + defb '$' +; +io0: defb 01BH,'=',5+20H,12+20H,0FFH +io1: defb 01BH,'=',5+20H,36+20H,0FFH +io2: defb 01BH,'=',6+20H,12+20H,0FFH +io3: defb 01BH,'=',6+20H,36+20H,0FFH +io4: defb 01BH,'=',10+20H,19+20H,0FFH +; +go$out: ;here to exit check if any changes so as to + ;know wether to write to disk or not + ld a,(change) + cp 0FFH ;0FFH=nochanges + jp nz,askout +bye: + ld a,0 + ld (0FA34H),a ;reset write safe off + jp z,0 ;exit with no changes +; +; +askout: + uprint ask + input ;get response + res 5,a ;make upper case + cp 'N' + jp z,bye ;exit + cp 'Y' + jr nz,askout +; +; now to write the changes to the disk +procede: ;get on with it +;reset the disk system for drive B + ld a,0FFH + ld (0FA34H),a ;set the write safe flag + ld c,14 ;select disk + ld a,(disk) ;find out which disk to use + ld e,a + call 5 ;tell bdos +; +;set up initial paramaters + ld hl,cbios + ld (from),hl ;where to start writing from +; + ld bc,0001H + ld (track),bc ;track we will be using +; + ld bc,21 + ld (sector),bc ;first sector to write to +; + ld a,4 + ld (count),a ;how many sectors to write +; + ld hl,080H + ld (secsize),hl ;sector size +; +;now to do the writing on the disk +nextsec: + ld bc,(track) + call 0FA1EH ;set the track required +; + ld bc,(from) + call 0FA24H ;set the dma address +; + ld bc,(sector) + call 0FA21H ;set the sector to write +; + ld c,0 + call 0FA2AH ;write the sector +; check for error's on return + cp 0 ;a=0=no errors + jr z,go$on + uprint erms ;error message + uprint crtocont + input ;pause for any key to continue + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +go$on: + ld hl,(from) ;dma address + ld de,(secsize) + add hl,de ;bump dma address + ld (from),hl ;save it for reuse + ld a,(sector) + inc a ;bump sector number + ld (sector),a ;save for next write + ld a,(count) ;are we + dec a ;done yet + ld (count),a ;save in case we are not done + cp 0 + jp nz,nextsec ;not yet finished +; + uprint alldone + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +change: defb 0 +disk: defb 0 +from: defw 0 +puthere: + defw 0 +track: defw 0 +sector: defw 0 +count: defb 0 +gohere: defw 0 +secsize: + defw 0 +crlf: defb cr,lf,'$' +alldone: + defb cr,lf,'DONE WITH CONFIGURATION',cr,lf,'$' +crtocont: + defb cr,lf,'Please type any key to continue','$' +erms: + defb cr,lf,'*** I can''t write to your disk ***',cr,lf,'$' +menuheader: + defb 01AH,cr,lf,cr,lf + defb 'KAYPRO II CONFIGURATION PROGRAM 11 July 1982' +; +choices: + defb cr,lf + defb '-----------------------------------------------' + defb cr,lf,cr,lf + defb 'CHOICES' + defb cr,lf + defb '-------' + defb cr,lf,cr,lf + defb '$' +menu0: ;first level menu + defb '1 --------> I/O Byte cold boot defaults' + defb cr,lf + defb '2 --------> Write Safe flag' + defb cr,lf + defb '3 --------> Cursor Keys definitions' + defb cr,lf + defb '4 --------> Numerical keypad definitions' + defb cr,lf + defb '5 --------> Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> EXIT this program and return to CP/M' + defb cr,lf + defb cr,lf + defb '(* NOTE: Anything not changed will contain its default value. *)' + defb cr,lf + defb cr,lf + defb 'Any changes that this program can make will only affect the disk in drive B.' + defb cr,lf + defb 'These changes will not be seen until you move the disk to drive A and' + defb cr,lf + defb 'push the RESET switch (Cold Boot) or turn the power off and on,' + defb cr,lf + defb 'EXCEPT selection ''5'' (Baud rate) which will have an immediate effect.' + defb cr,lf + defb 'Upon exiting this program you will be asked whether you want to apply' + defb cr,lf + defb 'the changes to the disk in drive B.' + defb cr,lf + defb 'Please enter ''1'' or ''2'' or ''3'' or ''4'' or ''5'' or [ESC] key ====>','$' +menu1: ;I/O BYTE menu + defb '1 --------> Help (I/O Byte definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the I/O Byte' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu2: ;write safe flag + defb '1 --------> Help (Write safe flag definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the write safe flag' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf + defb cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu3: ;cursor key + defb '1 --------> Help (Cursor key definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Cursor key settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu4: ;numerical key-pad + defb '1 --------> Help (Numerical keypad definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Numerical keypad settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu5: ;baud rate + defb '1 --------> Help (Baud rate definitions)' + defb cr,lf,cr,lf + defb '2 --------> Change the Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +ask: + defb cr,lf + defb 'Y----------> procede to update the disk in drive B' + defb cr,lf + defb 'N----------> not ready, EXIT TO CP/M' + defb cr,lf + defb cr,lf + defb 'Please type (Y) or (N) ====>' + defb '$' +; +nummsg: + defb 1ah,cr,lf + defb 'On the right hand side of your KAYPRO II keyboard there is a group of',cr,lf + defb 'fourteen keys, labeled: 7 8 9 -',cr,lf + defb ' 4 5 6 ,',cr,lf + defb ' 1 2 3 enter',cr,lf + defb ' 0 .',cr,lf + defb cr,lf + defb 'These fourteen keys each produce a unique code when typed.',cr,lf + defb 'In some situations it may be useful to have one or more keys ',cr,lf + defb 'provide a special function, such as in an application',cr,lf + defb 'program requiring choices from a menu.',cr,lf + defb ' This portion of the CONFIGURATION program allows you to set the',cr,lf + defb 'codes which will be produced by these fourteen keys.',cr,lf + defb cr,lf,lf,lf,lf + defb '$' +baudmsg: + defb 1ah,cr,lf + defb 'Your KAYPRO II computer has a serial port with which you may communicate',cr,lf + defb 'with the outside world. This serial port is most often referred to as',cr,lf + defb 'RS-232. In using RS-232 both the computer and the external device',cr,lf + defb 'must be set at the same baud rate (the speed at which data travels)',cr,lf + defb cr,lf + defb ' Your KAYPRO II is capable of the following baud rates:',cr,lf + defb ' 50 -not used very often',cr,lf + defb ' 75 -not used very often',cr,lf + defb ' 110 -used with slower printers',cr,lf + defb ' 134.5 -used with some IBM printers',cr,lf + defb ' 150 -not used very often',cr,lf + defb ' 300 -very common (default on your KAYPRO II on reset)',cr,lf + defb ' 600 -not used very often',cr,lf + defb ' 1200 -used with many printers',cr,lf + defb ' 1800 -not used very often',cr,lf + defb ' 2000 -not used very often',cr,lf + defb ' 2400 -not used very often',cr,lf + defb ' 3600 -not used very often',cr,lf + defb ' 4800 -higher rate for faster printers',cr,lf + defb ' 7200 -not used very often',cr,lf + defb ' 9600 -highest rate normally used',cr,lf + defb '19200 -very high rate (for special purposes)',cr,lf + defb '(* NOTE: the PRESENT baud rate remains in effect until the next RESET *)' + defb '$' +iomsg: defb 1ah,cr,lf + defb 'In order to understand this command you should read the CP/M manual',cr,lf + defb '"AN INTRODUCTION TO CP/M FEATURES AND FACILITIES", the STAT command',cr,lf + defb 'logical and physical devices. The logical CP/M devices are: CON: LST:',cr,lf + defb 'RDR: and PUN:. The physical devices for the KAYPRO computer are:',cr,lf,lf + defb ' CRT: Video and Keyboard',cr,lf + defb ' TTY: Serial port (note the connector must be wired as in the manual)',cr,lf + defb ' LPT: Centronics port',cr,lf + defb ' UL1: This is the same as TTY: above',cr,lf + defb ' PTP: This is the same as TTY: above',cr,lf,lf + defb 'Possible logical to physical assignments are:',cr,lf,lf + defb ' CON: = TTY: or CRT:',cr,lf + defb ' RDR: = TTY:',cr,lf + defb ' PUN: = TTY: or CRT: or LPT: or UL1:',cr,lf,lf + defb 'BEFORE using this option try it with the STAT command in CP/M.',cr,lf + defb cr,lf,'$' +safmsg: defb 1ah, cr, lf + defb 'Your KAYPRO computer comes with a special "Write Safe" option that corrects',cr,lf + defb 'a problem with CP/M when running with SOME application programs. It is not',cr,lf + defb 'possible to make the following description nontechnical. If you do not under-',cr,lf + defb 'stand it, ask your dealer. The wrong setting of the "Write Safe" flag may cause',cr,lf + defb 'the IRREVOCABLE LOSS OF DATA AND OR PROGRAM(S).',cr,lf,lf + defb 'The KAYPRO computer uses deblocking. When a disk write operation is',cr,lf + defb 'immediately followed by a warm boot, the deblocking buffer may not be',cr,lf + defb 'written to the disk. This is not a likely sequence of events. Most programs',cr,lf + defb 'when finished writing to a file, will close it. ALL directory operations force',cr,lf + defb 'the deblock buffer to disk on write. The "Write Safe" flag tells the BIOS',cr,lf + defb 'that ALL disk operations are directory type. This forces the buffer to the',cr,lf + defb 'disk. The price is performance, as "Write Safe" will slow the computer down',cr,lf + defb 'from 2 to 4 times when writing to the disk. "Write Safe" is not a panacea',cr,lf + defb 'for system or program problems. The chance you will need it is rare.',cr,lf,lf + defb cr,lf,'$' +vecmsg: defb 1ah,cr,lf + defb 'It is not possible to make the following discription nontechnical.', cr, lf + defb 'If you do not understand it please ask your dealer.',cr,lf,lf + defb 'Your KAYPRO II computer comes with four arrow keys, they are at the upper right',cr,lf + defb 'of the main keyboard. They are usually referred to as CURSOR keys. They are ',cr,lf + defb 'used in programs such as SELECT to move the cursor. These keys produce codes',cr,lf + defb 'that are recognized by applications programs. The codes that they produce may',cr,lf + defb 'or may not be the codes that an application you supply wants. The codes sent',cr,lf + defb 'by the keyboard are unique, MSB set. The BIOS translates the keyboard codes',cr,lf + defb 'using a table in the BIOS. This option of the configure program allows you',cr,lf + defb 'to change the values in this table and record it on the disk. The memory',cr,lf + defb 'image is not changed until you cold boot (reset).',cr,lf,lf + defb cr,lf,'$' +;here begins the updated cbios which must eventually +;reside and operate at 0FA00H which is 01F80H in the sysgen image +;and is track 1 sectors 21-22-23-24 on the disk +; +cbios: ;label to allow update to find him +;*************************************** + .phase bios ;absolute location of code following + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + +;**************************************** + end config + \ No newline at end of file diff --git a/2006/toledo2/CONFIG.COM b/2006/toledo2/CONFIG.COM new file mode 100644 index 000000000..6645816a8 Binary files /dev/null and b/2006/toledo2/CONFIG.COM differ diff --git a/2006/toledo2/COPY.COM b/2006/toledo2/COPY.COM new file mode 100644 index 000000000..4aa4063a2 Binary files /dev/null and b/2006/toledo2/COPY.COM differ diff --git a/2006/toledo2/CPM64.COM b/2006/toledo2/CPM64.COM new file mode 100644 index 000000000..a5766f288 Binary files /dev/null and b/2006/toledo2/CPM64.COM differ diff --git a/2006/toledo2/DBASEII/APPEND.OVR b/2006/toledo2/DBASEII/APPEND.OVR new file mode 100644 index 000000000..457fe05a0 Binary files /dev/null and b/2006/toledo2/DBASEII/APPEND.OVR differ diff --git a/2006/toledo2/DBASEII/DBASE.COM b/2006/toledo2/DBASEII/DBASE.COM new file mode 100644 index 000000000..b19a7d48c Binary files /dev/null and b/2006/toledo2/DBASEII/DBASE.COM differ diff --git a/2006/toledo2/DBASEII/DBASEAPP.OVR b/2006/toledo2/DBASEII/DBASEAPP.OVR new file mode 100644 index 000000000..3eae192c8 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEAPP.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEBRO.OVR b/2006/toledo2/DBASEII/DBASEBRO.OVR new file mode 100644 index 000000000..5601fe289 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEBRO.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEJOI.OVR b/2006/toledo2/DBASEII/DBASEJOI.OVR new file mode 100644 index 000000000..a45fc0ee9 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEJOI.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEMAI.OVR b/2006/toledo2/DBASEII/DBASEMAI.OVR new file mode 100644 index 000000000..a6019b196 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEMAI.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEMOD.OVR b/2006/toledo2/DBASEII/DBASEMOD.OVR new file mode 100644 index 000000000..baa9bcf5b Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEMOD.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEMSC.OVR b/2006/toledo2/DBASEII/DBASEMSC.OVR new file mode 100644 index 000000000..0f1759ffd Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEMSC.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEMSG.COM b/2006/toledo2/DBASEII/DBASEMSG.COM new file mode 100644 index 000000000..f56db9eb1 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEMSG.COM differ diff --git a/2006/toledo2/DBASEII/DBASERPG.OVR b/2006/toledo2/DBASEII/DBASERPG.OVR new file mode 100644 index 000000000..2b7b2371a Binary files /dev/null and b/2006/toledo2/DBASEII/DBASERPG.OVR differ diff --git a/2006/toledo2/DBASEII/DBASESRT.OVR b/2006/toledo2/DBASEII/DBASESRT.OVR new file mode 100644 index 000000000..c7c8ede54 Binary files /dev/null and b/2006/toledo2/DBASEII/DBASESRT.OVR differ diff --git a/2006/toledo2/DBASEII/DBASETTL.OVR b/2006/toledo2/DBASEII/DBASETTL.OVR new file mode 100644 index 000000000..599424f4c Binary files /dev/null and b/2006/toledo2/DBASEII/DBASETTL.OVR differ diff --git a/2006/toledo2/DBASEII/DBASEUPD.OVR b/2006/toledo2/DBASEII/DBASEUPD.OVR new file mode 100644 index 000000000..4c82f312b Binary files /dev/null and b/2006/toledo2/DBASEII/DBASEUPD.OVR differ diff --git a/2006/toledo2/DBASEII/EQUAL85.DBF b/2006/toledo2/DBASEII/EQUAL85.DBF new file mode 100644 index 000000000..9056c3579 Binary files /dev/null and b/2006/toledo2/DBASEII/EQUAL85.DBF differ diff --git a/2006/toledo2/DBASEII/FORMAT.COM b/2006/toledo2/DBASEII/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/DBASEII/FORMAT.COM differ diff --git a/2006/toledo2/DBASEII/INDX.NDX b/2006/toledo2/DBASEII/INDX.NDX new file mode 100644 index 000000000..1d48e242d Binary files /dev/null and b/2006/toledo2/DBASEII/INDX.NDX differ diff --git a/2006/toledo2/DBASEII/JOIN.OVR b/2006/toledo2/DBASEII/JOIN.OVR new file mode 100644 index 000000000..4ae1e019b Binary files /dev/null and b/2006/toledo2/DBASEII/JOIN.OVR differ diff --git a/2006/toledo2/DBASEII/LEAST85.DBF b/2006/toledo2/DBASEII/LEAST85.DBF new file mode 100644 index 000000000..1471abde7 Binary files /dev/null and b/2006/toledo2/DBASEII/LEAST85.DBF differ diff --git a/2006/toledo2/DBASEII/MAIN.OVR b/2006/toledo2/DBASEII/MAIN.OVR new file mode 100644 index 000000000..9e4288ac9 Binary files /dev/null and b/2006/toledo2/DBASEII/MAIN.OVR differ diff --git a/2006/toledo2/DBASEII/MISC.OVR b/2006/toledo2/DBASEII/MISC.OVR new file mode 100644 index 000000000..ca8f0036f Binary files /dev/null and b/2006/toledo2/DBASEII/MISC.OVR differ diff --git a/2006/toledo2/DBASEII/MISSING.TXT b/2006/toledo2/DBASEII/MISSING.TXT new file mode 100644 index 000000000..be32cfbe3 --- /dev/null +++ b/2006/toledo2/DBASEII/MISSING.TXT @@ -0,0 +1,135 @@ + + MISSING MISSING MISSING MISSING MISSING +Adams, Susan Edmunds, Susie Magee, Sharon +Andersen, Carol Elliot, Bonnie Mahan, Marcus +Anderson, Betty Jo Ellis, Robert Markussen, Einer +Anderson, Bill Evans, James Martin, Judy +Arnold, Lois Martin, Larry +Avila, Edward Fisher, Charles Martin, Phil +Ayers, Deanna Fleming, Billie Martin, Terri + Fleming, Bonnie Matthews, Allen +Baines, Sharon Flores, Grace McCabe, Ray +Bales, Bob Ford, Nancy McClain, Phyllis +Barden, Gary Franze, Brent McCusker, Marianne +Barnes, Bruce Frendandes, Marlyene McDonald, Jerry +Barnett, Lyn McKee, Greg +Barstow, Dennis Galman, Jean McKenna, Terry +Beck, Michael Garcia, Kathy VonDuring McKennon, Trudy +Bishop, Russell Garner, Joan Means, Kathie +Blodgett, Eleanor Gilles, Darlene Meyer, Ellen +Blount, Mike Giordano, Ben Middleton, Elaine +Boirun, Sharon Graham, Bill Miller, Janet +Bowyer, Dennis N. Greene, Albert Mills, Tom +Brandon, Pamela Greene, James Minich, Marilyn +Bretz, Timothy Grover, Doug Mirabal, Robert +Brinton, Linda Montavon, Vicky Garvey +Brooks, Maureen Haechner, Virginia Moormann, Mary +Bryan, Jerald Haley, Ted Mueller, Bob +Burdette, Melinda Hall, Larry +Burge, Ron Halloran, Lana Newton, Archie +Burnette, Suzanne Hankins, James Newtson, Lila + Hanson, Craig Nichols, Terry +Cable, William Hart, Donald +Callum, Susie Hiestand, Mike Oliver, Mike +Calvert, Keith Higgens, Jeanne Orlowski, Christine +Card, Ronald Hoffman, Dennis +Chase, Manetta Holman, Candy Pederson, Kelly +Chisholm, Neil Hoskins, Susan Perry, John +Christopher, Bob Huff, Roberta Pinkstaff, Bob +Cifarelli, Ed Huth, Greg +Cleare, Carol Hyman, Nancy Raines, Don +Coates, Jim Hynes, Tom Ramsey, Patty +Corey, Steve Reagan, John +Courson, Judy Johnson, Donna Reynolds, Frances +Creamer, Russell Johnson, Judith Robben, Sheila +Crook, Ken Johnson, Laura Robinson, Linda +Crothers, Brian Johnson, William Ross, John +Crowson, Connie Jones, Brenda McCollough Rowe, Ted +Cullum, Pat Jones, Cynthia Rowell, Wendy +Curran, Alberta Jones, Edith Rowland, Donna + Jones, Linda Rutledge, Randy +Dalton, Patty +Danis, Jeff Keating, Donald Sanders, Jim +Darrigan, Patty Kephart, Carol Sanders, Linda +Davis, Bob Kingston, Victoria Sanford, Sue +DeBaca, Daniel Kuebler, Cheryl Schaffer, Kathy +DeMey, Mike Schaub, Pam +Dias, Birdie Lang, Jim Schroeder, Bob +Dickerson, Norma Lewis, Peggy Doutre Schulte, Ann +Dobson, Ziona Locklear, Alan Schultz, Sandy +Drafts, Danny Logan, Linda Schumacher, Roxann +Duffy, Happy Loomis, Scott Scott, John +Duncan, Betty Lorentz, William Seward, Kathleen +Dunn, Jim Lowry, Byron Shand, Linda Anderson + + + + + + MISSING MISSING MISSING MISSING MISSING +Sheckells, Charles Valdivia, Carmen +Silvey, Maxine Vanderliden, John +Simon, Bob Vaughan, James +Skelton, Susan Vaughn, Connie +Slavinski, Joanne Villa, Emma +Sloan, Linda +Smelser, Steve Wachsman, Camelia +Sonsag, Leona Walters, Frances +Sowells, Loraine Warman, Chadwick +Spears, Joyce Webber, Mike +Stevens, Barbara Webster, Dick +Stewart, Peggy Westerly, John +Stitt, James Whary, Penney +Stokes, Stephens Wheeler, Gary +Stuart, Jacquelyn Whiddon, Susan +Swayze, Ed White, Lawrence +Swinson, Sheryl Whiting, Bill + Wiener, Bruce +Tackwell, Harold Wilkason, Sharon +Taylor, Carolyn Williams, Janet +Taylor, Pattie Williams, Rae +Thomas, Linda Williams, Roy +Thomas, Stephanie Wilson, John +Thompson, Carol Wilson, Kent +Thompson, Sandra Wood, Larry +Tomkinson, Linda Woodruff, Craig +Topping, Patty Wyant, Gorden +Towner, Marilyn Wyman, Judy +Trabalka, Michael +T'Sas, Joyce Youngblood, Barbara + + Ziarnick, Jacqueline + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2006/toledo2/DBASEII/MODIFY.OVR b/2006/toledo2/DBASEII/MODIFY.OVR new file mode 100644 index 000000000..624045780 Binary files /dev/null and b/2006/toledo2/DBASEII/MODIFY.OVR differ diff --git a/2006/toledo2/DBASEII/PIP.COM b/2006/toledo2/DBASEII/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/DBASEII/PIP.COM differ diff --git a/2006/toledo2/DBASEII/PRINTE.CMD b/2006/toledo2/DBASEII/PRINTE.CMD new file mode 100644 index 000000000..f7b1a810c --- /dev/null +++ b/2006/toledo2/DBASEII/PRINTE.CMD @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + +@ 1,1 SAY 'PROFESSION' +@ 1,30 SAY 'EDUCATION' +@ 1,85 SAY 'EMPLOYERS' +@ 1,140 SAY 'OUTLOOK' +DO WHILE .NOT. EOF +@ 1,1 SAY NAME +@ 2,30 SAY EDUCATION +@ 2,85 SAY EMPLOYERS +@ 2,130 SAY OUTLOOK +* +* +* +ERASE +SKIP +ENDDO + + + + + + + + + +th generally predicted 40hr, expec. otgeneral employer benefits Mechanic \ No newline at end of file diff --git a/2006/toledo2/DBASEII/RPG.OVR b/2006/toledo2/DBASEII/RPG.OVR new file mode 100644 index 000000000..543fa964c Binary files /dev/null and b/2006/toledo2/DBASEII/RPG.OVR differ diff --git a/2006/toledo2/DBASEII/SORT.OVR b/2006/toledo2/DBASEII/SORT.OVR new file mode 100644 index 000000000..2e5904812 Binary files /dev/null and b/2006/toledo2/DBASEII/SORT.OVR differ diff --git a/2006/toledo2/DBASEII/STAT.COM b/2006/toledo2/DBASEII/STAT.COM new file mode 100644 index 000000000..1de359f27 Binary files /dev/null and b/2006/toledo2/DBASEII/STAT.COM differ diff --git a/2006/toledo2/DBASEII/SYSGEN.COM b/2006/toledo2/DBASEII/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/DBASEII/SYSGEN.COM differ diff --git a/2006/toledo2/DBASEII/TOTAL.OVR b/2006/toledo2/DBASEII/TOTAL.OVR new file mode 100644 index 000000000..54168b07f Binary files /dev/null and b/2006/toledo2/DBASEII/TOTAL.OVR differ diff --git a/2006/toledo2/DBASEII/UPDATE.OVR b/2006/toledo2/DBASEII/UPDATE.OVR new file mode 100644 index 000000000..6bf89a6f5 Binary files /dev/null and b/2006/toledo2/DBASEII/UPDATE.OVR differ diff --git a/2006/toledo2/DBASEII/XDIR.COM b/2006/toledo2/DBASEII/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/DBASEII/XDIR.COM differ diff --git a/2006/toledo2/DDT.COM b/2006/toledo2/DDT.COM new file mode 100644 index 000000000..83f8603f9 Binary files /dev/null and b/2006/toledo2/DDT.COM differ diff --git a/2006/toledo2/DUMP.COM b/2006/toledo2/DUMP.COM new file mode 100644 index 000000000..03a77c3ca Binary files /dev/null and b/2006/toledo2/DUMP.COM differ diff --git a/2006/toledo2/ED.COM b/2006/toledo2/ED.COM new file mode 100644 index 000000000..a0f0f5410 Binary files /dev/null and b/2006/toledo2/ED.COM differ diff --git a/2006/toledo2/FORMAT.COM b/2006/toledo2/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/FORMAT.COM differ diff --git a/2006/toledo2/GAMES/ALIENS.COM b/2006/toledo2/GAMES/ALIENS.COM new file mode 100644 index 000000000..8db719d42 Binary files /dev/null and b/2006/toledo2/GAMES/ALIENS.COM differ diff --git a/2006/toledo2/GAMES/ASM.COM b/2006/toledo2/GAMES/ASM.COM new file mode 100644 index 000000000..a6a54da56 Binary files /dev/null and b/2006/toledo2/GAMES/ASM.COM differ diff --git a/2006/toledo2/GAMES/BAUD.COM b/2006/toledo2/GAMES/BAUD.COM new file mode 100644 index 000000000..f7fd7bb5a Binary files /dev/null and b/2006/toledo2/GAMES/BAUD.COM differ diff --git a/2006/toledo2/GAMES/CATCHUM.COM b/2006/toledo2/GAMES/CATCHUM.COM new file mode 100644 index 000000000..b12828641 Binary files /dev/null and b/2006/toledo2/GAMES/CATCHUM.COM differ diff --git a/2006/toledo2/GAMES/CATCHUM.DAT b/2006/toledo2/GAMES/CATCHUM.DAT new file mode 100644 index 000000000..73a659e34 Binary files /dev/null and b/2006/toledo2/GAMES/CATCHUM.DAT differ diff --git a/2006/toledo2/GAMES/CONFIG.COM b/2006/toledo2/GAMES/CONFIG.COM new file mode 100644 index 000000000..ed135598c Binary files /dev/null and b/2006/toledo2/GAMES/CONFIG.COM differ diff --git a/2006/toledo2/GAMES/COPY.COM b/2006/toledo2/GAMES/COPY.COM new file mode 100644 index 000000000..181c17850 Binary files /dev/null and b/2006/toledo2/GAMES/COPY.COM differ diff --git a/2006/toledo2/GAMES/D.COM b/2006/toledo2/GAMES/D.COM new file mode 100644 index 000000000..4653df331 Binary files /dev/null and b/2006/toledo2/GAMES/D.COM differ diff --git a/2006/toledo2/GAMES/DDT.COM b/2006/toledo2/GAMES/DDT.COM new file mode 100644 index 000000000..83f8603f9 Binary files /dev/null and b/2006/toledo2/GAMES/DDT.COM differ diff --git a/2006/toledo2/GAMES/DUMP.ASM b/2006/toledo2/GAMES/DUMP.ASM new file mode 100644 index 000000000..1b713f34f --- /dev/null +++ b/2006/toledo2/GAMES/DUMP.ASM @@ -0,0 +1,215 @@ +; FILE DUMP PROGRAM, READS AN INPUT FILE AND PRINTS IN HEX +; +; COPYRIGHT (C) 1975, 1976, 1977, 1978 +; DIGITAL RESEARCH +; BOX 579, PACIFIC GROVE +; CALIFORNIA, 93950 +; + ORG 100H +BDOS EQU 0005H ;DOS ENTRY POINT +CONS EQU 1 ;READ CONSOLE +TYPEF EQU 2 ;TYPE FUNCTION +PRINTF EQU 9 ;BUFFER PRINT ENTRY +BRKF EQU 11 ;BREAK KEY FUNCTION (TRUE IF CHAR READY) +OPENF EQU 15 ;FILE OPEN +READF EQU 20 ;READ FUNCTION +; +FCB EQU 5CH ;FILE CONTROL BLOCK ADDRESS +BUFF EQU 80H ;INPUT DISK BUFFER ADDRESS +; +; NON GRAPHIC CHARACTERS +CR EQU 0DH ;CARRIAGE RETURN +LF EQU 0AH ;LINE FEED +; +; FILE CONTROL BLOCK DEFINITIONS +FCBDN EQU FCB+0 ;DISK NAME +FCBFN EQU FCB+1 ;FILE NAME +FCBFT EQU FCB+9 ;DISK FILE TYPE (3 CHARACTERS) +FCBRL EQU FCB+12 ;FILE'S CURRENT REEL NUMBER +FCBRC EQU FCB+15 ;FILE'S RECORD COUNT (0 TO 128) +FCBCR EQU FCB+32 ;CURRENT (NEXT) RECORD NUMBER (0 TO 127) +FCBLN EQU FCB+33 ;FCB LENGTH +; +; SET UP STACK + LXI H,0 + DAD SP +; ENTRY STACK POINTER IN HL FROM THE CCP + SHLD OLDSP +; SET SP TO LOCAL STACK AREA (RESTORED AT FINIS) + LXI SP,STKTOP +; READ AND PRINT SUCCESSIVE BUFFERS + CALL SETUP ;SET UP INPUT FILE + CPI 255 ;255 IF FILE NOT PRESENT + JNZ OPENOK ;SKIP IF OPEN IS OK +; +; FILE NOT THERE, GIVE ERROR MESSAGE AND RETURN + LXI D,OPNMSG + CALL ERR + JMP FINIS ;TO RETURN +; +OPENOK: ;OPEN OPERATION OK, SET BUFFER INDEX TO END + MVI A,80H + STA IBP ;SET BUFFER POINTER TO 80H +; HL CONTAINS NEXT ADDRESS TO PRINT + LXI H,0 ;START WITH 0000 +; +GLOOP: + PUSH H ;SAVE LINE POSITION + CALL GNB + POP H ;RECALL LINE POSITION + JC FINIS ;CARRY SET BY GNB IF END FILE + MOV B,A +; PRINT HEX VALUES +; CHECK FOR LINE FOLD + MOV A,L + ANI 0FH ;CHECK LOW 4 BITS + JNZ NONUM +; PRINT LINE NUMBER + CALL CRLF +; +; CHECK FOR BREAK KEY + CALL BREAK +; ACCUM LSB = 1 IF CHARACTER READY + RRC ;INTO CARRY + JC FINIS ;DON'T PRINT ANY MORE +; + MOV A,H + CALL PHEX + MOV A,L + CALL PHEX +NONUM: + INX H ;TO NEXT LINE NUMBER + MVI A,' ' + CALL PCHAR + MOV A,B + CALL PHEX + JMP GLOOP +; +FINIS: +; END OF DUMP, RETURN TO CCP +; (NOTE THAT A JMP TO 0000H REBOOTS) + CALL CRLF + LHLD OLDSP + SPHL +; STACK POINTER CONTAINS CCP'S STACK LOCATION + RET ;TO THE CCP +; +; +; SUBROUTINES +; +BREAK: ;CHECK BREAK KEY (ACTUALLY ANY KEY WILL DO) + PUSH H! PUSH D! PUSH B; ENVIRONMENT SAVED + MVI C,BRKF + CALL BDOS + POP B! POP D! POP H; ENVIRONMENT RESTORED + RET +; +PCHAR: ;PRINT A CHARACTER + PUSH H! PUSH D! PUSH B; SAVED + MVI C,TYPEF + MOV E,A + CALL BDOS + POP B! POP D! POP H; RESTORED + RET +; +CRLF: + MVI A,CR + CALL PCHAR + MVI A,LF + CALL PCHAR + RET +; +; +PNIB: ;PRINT NIBBLE IN REG A + ANI 0FH ;LOW 4 BITS + CPI 10 + JNC P10 +; LESS THAN OR EQUAL TO 9 + ADI '0' + JMP PRN +; +; GREATER OR EQUAL TO 10 +P10: ADI 'A' - 10 +PRN: CALL PCHAR + RET +; +PHEX: ;PRINT HEX CHAR IN REG A + PUSH PSW + RRC + RRC + RRC + RRC + CALL PNIB ;PRINT NIBBLE + POP PSW + CALL PNIB + RET +; +ERR: ;PRINT ERROR MESSAGE +; D,E ADDRESSES MESSAGE ENDING WITH "$" + MVI C,PRINTF ;PRINT BUFFER FUNCTION + CALL BDOS + RET +; +; +GNB: ;GET NEXT BYTE + LDA IBP + CPI 80H + JNZ G0 +; READ ANOTHER BUFFER +; +; + CALL DISKR + ORA A ;ZERO VALUE IF READ OK + JZ G0 ;FOR ANOTHER BYTE +; END OF DATA, RETURN WITH CARRY SET FOR EOF + STC + RET +; +G0: ;READ THE BYTE AT BUFF+REG A + MOV E,A ;LS BYTE OF BUFFER INDEX + MVI D,0 ;DOUBLE PRECISION INDEX TO DE + INR A ;INDEX=INDEX+1 + STA IBP ;BACK TO MEMORY +; POINTER IS INCREMENTED +; SAVE THE CURRENT FILE ADDRESS + LXI H,BUFF + DAD D +; ABSOLUTE CHARACTER ADDRESS IS IN HL + MOV A,M +; BYTE IS IN THE ACCUMULATOR + ORA A ;RESET CARRY BIT + RET +; +SETUP: ;SET UP FILE +; OPEN THE FILE FOR INPUT + XRA A ;ZERO TO ACCUM + STA FCBCR ;CLEAR CURRENT RECORD +; + LXI D,FCB + MVI C,OPENF + CALL BDOS +; 255 IN ACCUM IF OPEN ERROR + RET +; +DISKR: ;READ DISK FILE RECORD + PUSH H! PUSH D! PUSH B + LXI D,FCB + MVI C,READF + CALL BDOS + POP B! POP D! POP H + RET +; +; FIXED MESSAGE AREA +SIGNON: DB 'FILE DUMP VERSION 1.4$' +OPNMSG: DB CR,LF,'NO INPUT FILE PRESENT ON DISK$' + +; VARIABLE AREA +IBP: DS 2 ;INPUT BUFFER POINTER +OLDSP: DS 2 ;ENTRY SP VALUE FROM CCP +; +; STACK AREA + DS 64 ;RESERVE 32 LEVEL STACK +STKTOP: +; + END + \ No newline at end of file diff --git a/2006/toledo2/GAMES/DUMP.COM b/2006/toledo2/GAMES/DUMP.COM new file mode 100644 index 000000000..03a77c3ca Binary files /dev/null and b/2006/toledo2/GAMES/DUMP.COM differ diff --git a/2006/toledo2/GAMES/ED.COM b/2006/toledo2/GAMES/ED.COM new file mode 100644 index 000000000..a0f0f5410 Binary files /dev/null and b/2006/toledo2/GAMES/ED.COM differ diff --git a/2006/toledo2/GAMES/INITDISK.COM b/2006/toledo2/GAMES/INITDISK.COM new file mode 100644 index 000000000..5989587a8 Binary files /dev/null and b/2006/toledo2/GAMES/INITDISK.COM differ diff --git a/2006/toledo2/GAMES/LADDER.COM b/2006/toledo2/GAMES/LADDER.COM new file mode 100644 index 000000000..9d052fe4c Binary files /dev/null and b/2006/toledo2/GAMES/LADDER.COM differ diff --git a/2006/toledo2/GAMES/LADDER.DAT b/2006/toledo2/GAMES/LADDER.DAT new file mode 100644 index 000000000..8843761b4 Binary files /dev/null and b/2006/toledo2/GAMES/LADDER.DAT differ diff --git a/2006/toledo2/GAMES/LOAD.COM b/2006/toledo2/GAMES/LOAD.COM new file mode 100644 index 000000000..b9601e002 Binary files /dev/null and b/2006/toledo2/GAMES/LOAD.COM differ diff --git a/2006/toledo2/GAMES/MOVCPM.COM b/2006/toledo2/GAMES/MOVCPM.COM new file mode 100644 index 000000000..835f1fb6b Binary files /dev/null and b/2006/toledo2/GAMES/MOVCPM.COM differ diff --git a/2006/toledo2/GAMES/PIP.COM b/2006/toledo2/GAMES/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/GAMES/PIP.COM differ diff --git a/2006/toledo2/GAMES/SETDISK.COM b/2006/toledo2/GAMES/SETDISK.COM new file mode 100644 index 000000000..78694963e Binary files /dev/null and b/2006/toledo2/GAMES/SETDISK.COM differ diff --git a/2006/toledo2/GAMES/STAT.COM b/2006/toledo2/GAMES/STAT.COM new file mode 100644 index 000000000..1de359f27 Binary files /dev/null and b/2006/toledo2/GAMES/STAT.COM differ diff --git a/2006/toledo2/GAMES/SUBMIT.COM b/2006/toledo2/GAMES/SUBMIT.COM new file mode 100644 index 000000000..400ce2f7f Binary files /dev/null and b/2006/toledo2/GAMES/SUBMIT.COM differ diff --git a/2006/toledo2/GAMES/SYSGEN.COM b/2006/toledo2/GAMES/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/GAMES/SYSGEN.COM differ diff --git a/2006/toledo2/GAMES/TERM.COM b/2006/toledo2/GAMES/TERM.COM new file mode 100644 index 000000000..2b8e6408a Binary files /dev/null and b/2006/toledo2/GAMES/TERM.COM differ diff --git a/2006/toledo2/GAMES/XSUB.COM b/2006/toledo2/GAMES/XSUB.COM new file mode 100644 index 000000000..15e86abfc Binary files /dev/null and b/2006/toledo2/GAMES/XSUB.COM differ diff --git a/2006/toledo2/INITDISK.COM b/2006/toledo2/INITDISK.COM new file mode 100644 index 000000000..fbeba1123 Binary files /dev/null and b/2006/toledo2/INITDISK.COM differ diff --git a/2006/toledo2/KAYPROII.ZIP b/2006/toledo2/KAYPROII.ZIP new file mode 100644 index 000000000..c4d8ed2b1 Binary files /dev/null and b/2006/toledo2/KAYPROII.ZIP differ diff --git a/2006/toledo2/KBIOS.ASM b/2006/toledo2/KBIOS.ASM new file mode 100644 index 000000000..541f5301a --- /dev/null +++ b/2006/toledo2/KBIOS.ASM @@ -0,0 +1,274 @@ +title KAYPRO CBIOS for CP/M 2.2 +;############################################################### +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 7,1982 [001] ## +;## by jim nickerson +;## changes: ## +;## -allow redefinition of kpd in cbios ## +;## -change to allow test of serial on liststatus## +;## -default ul1: to tty on list ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set +; and 03H ; form table index to vtab + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +;punch: ld a,(iobyte) ; check i/o byte +; and 30H +; ld hl,rom+39H ; serial punch +; jp z,callrom +; ld hl, rom+42H ; serial with cts as busy +; jp callrom +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom +; ld hl, rom+42H ; assume serial with cts as busy + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + + end + \ No newline at end of file diff --git a/2006/toledo2/KERMIT/ATEST.DOC b/2006/toledo2/KERMIT/ATEST.DOC new file mode 100644 index 000000000..b95ccbb2c --- /dev/null +++ b/2006/toledo2/KERMIT/ATEST.DOC @@ -0,0 +1,122 @@ + + + + FROM: Robert N. Barry 30 May 1986 + + SUBJECT: WEEKLY ACTIVITY REPORT (27 - 30 May 1986) + + + TO: ENMD/Steve Chase + + + 1®  TSF-IFDAPS: + + 1.±  É  aí preparinç á datá baså oæ thå TSF-IFDAPÓ  documentó  tï � + control my review of those documents. + + 2. IFAST I&M Developement + + 2.1 MSIP Adaptation Task: + + 2.1.± É havå prepareä mù evaluatioî oæ thå SETÁ performance®  É � + trieä tï givå theí crediô foò gettinç thå tasë IOÃ donå oî  time¬ � + buô flaggeä thå areaó theù neeä tï correct®  Theù treaô planninç � + aó   somethinç   onlù  donå  insidå  aî  individual'ó  heaä   anä � + documentatioî aó somethinç thå AÆ requires®  É wilì turî iô intï � + ENMÄ oî ² Junå 1986. + + 2.1.²  (REPEAT©  É aí pressinç VERAÃ tï producå  thå  equipmenô � + lisô ASAP. + + 2.² Oî CSÃ Tasks: + Thå  CSÃ plant-in-place-recordó tasë waó extendeä tï finisè thå � + missinç drawingó anä tï supporô ENVS(Rallis© untiì theù caî cuô á � + task directive. + + 2.3 Transition and Turnover: + + 2.3.± (REPEAT© Mr®  Reaveò haó askeä thå QÁ personnel¬ ENRMQ¬ tï � + definå thå remaininç itemó undeò thå Timå Shareä Computeò Compleø � + Transitioî  anä  Turnoveò Plan®  Thå remaininç  itemó  areº  O&Í � + Procedures¬  PIPRó  Datá  Communications¬  anä Finaì  Revie÷  anä � + Inspection. + + 2.3.²  (REPEAT©  É  havå requesteä Mr®  Reaveò (aó  onå  oæ  hió � + remaininç  ENMÄ  tasks©  tï  completå thå  finaì  transitioî  anä � + turnoveò  plaî froí ENMÄ tï ENVÓ - ASAP®  VERAÃ ió verù latå  iî � + providinç  thå MSIÐ Adaptatioî Tasë equipmenô lisô  requireä  foò � + thå Finaì T&Ô Plan. + + 2.3.³  É  aí  helpinç Capô Rallió resolvå questionó  aó  tï  thå � + configuration rationale and inventory of the ADPE. + + 2.´  É  aí preparinç á drafô oæ thå performancå evaluatioî  foò � + Toí Chovaî anä Mikå Reaver® Requireä bù µ Junå 1986. + + 2.¶  (REPEAT©  É  havå  tï revie÷ thå  ne÷  versioî  oæ  thå  Bµ � + specificatioî foò thå Simulatioî Models® Duå withiî 1µ days. + Š + + 1 + + + + Barry's 30 May 1986 WAR (con.) + + Coming Week and Future Work: + + 1. On-going tasks at TSF: + + 1.± Revie÷ TSF-IFDAPÓ specificatioî documentó provideä bù Stevå � + Chase. + 1.²  Meeô witè Capô Keusseyaî anä establisè á  learninç  procesó � + with him. + 1.3 Prepare for TDY to Lompoc on 2 June, Status Review. + + 2®  É  wilì  attempô  tï takå á numbeò  oæ  traininç  classes® � + Becauså  oæ thå lacë oæ manpoweò iî thå IFASÔ I&Í Development¬  É � + haä tï misó traininç opportunitieó oveò thå lasô siø years. + + 3®  Supportinç IFASÔ oî á aó needeä basis¬ limiteä tï onlù itemó � + requireä  tï  smootè thå transitioî anä  turnover®  Thió  cominç � + weeë  wilì  bå á significanô loaä becauså oæ thå  contractoò  anä � + Reaver'ó  anä Chovan'ó evaluationó required®  É wilì bå askeä bù � + ENVÓ tï helð understanä thå currenô ADPÅ configuration. + + 4®  Leavå Planneä - A/Ì oæ á littlå oveò ³ weeks¬  1¶ dayó froí � + thå  1¶ Junå 198¶ througè ¸ Julù 1986®  É wilì bacë ¹ Julù  1986® � + Summeò  Vacatioî trið tï thå Canadiaî World'ó Fair®  É  neeä  tï � + know who wants me to call in and answer questions. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 +  \ No newline at end of file diff --git a/2006/toledo2/KERMIT/B# b/2006/toledo2/KERMIT/B# new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/KERMIT/B# differ diff --git a/2006/toledo2/KERMIT/BAUD.COM b/2006/toledo2/KERMIT/BAUD.COM new file mode 100644 index 000000000..f7fd7bb5a Binary files /dev/null and b/2006/toledo2/KERMIT/BAUD.COM differ diff --git a/2006/toledo2/KERMIT/CONFIG.COM b/2006/toledo2/KERMIT/CONFIG.COM new file mode 100644 index 000000000..6645816a8 Binary files /dev/null and b/2006/toledo2/KERMIT/CONFIG.COM differ diff --git a/2006/toledo2/KERMIT/FORMAT.COM b/2006/toledo2/KERMIT/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/KERMIT/FORMAT.COM differ diff --git a/2006/toledo2/KERMIT/KAYKER.COM b/2006/toledo2/KERMIT/KAYKER.COM new file mode 100644 index 000000000..8c57db6c3 Binary files /dev/null and b/2006/toledo2/KERMIT/KAYKER.COM differ diff --git a/2006/toledo2/KERMIT/KAYVT52.KEY b/2006/toledo2/KERMIT/KAYVT52.KEY new file mode 100644 index 000000000..8de2367f7 --- /dev/null +++ b/2006/toledo2/KERMIT/KAYVT52.KEY @@ -0,0 +1,30 @@ +----------------------------------------- +| | | | | +| UP | DOWN | LEFT | RIGHT | +| REPLACE | SECT | APPEND | SPECINS | +| | | | | +----------------------------------------- + + +----------------------------------------- +| | | | | +| PAGE | FNDNXT | DEL W | GOLD | +| COMMAND | FIND | UND W | | +| | | | | +----------------------------------------- +| | | | | +| ADVANCE | BACKUP | DEL C | DEL L | +| BOTTOM | TOP | UND C | UND L | +| | | | | +----------------------------------------- +| | | | | +| WORD | EOL | CUT | | +| CHNGCASE| DEL EOL | PASTE | | +| | | | ENTER | +------------------------------- SUBS | +| | | | +| LINE | SELECT | | +| OPEN LINE | RESET | | +| | | | +----------------------------------------- + \ No newline at end of file diff --git a/2006/toledo2/KERMIT/PIP.COM b/2006/toledo2/KERMIT/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/KERMIT/PIP.COM differ diff --git a/2006/toledo2/KERMIT/PRINT.TST b/2006/toledo2/KERMIT/PRINT.TST new file mode 100644 index 000000000..202e46170 --- /dev/null +++ b/2006/toledo2/KERMIT/PRINT.TST @@ -0,0 +1,121 @@ +.cw12 +.hå (Thió texô ió á printouô oæ thå filå nameä PRINT.TST) +.fï WordStaò Overvie÷ Pagå # + + Welcome_to_WordStar* + +WordStar‚  ió  á powerfuì worä processinç systeí designeä tï  meeô � +texô preparatioî requirementó foò alì leveló oæ usersº + + * professional writers + * programmers + * text editors + * office administrators + * clerical staff + * students + + SPECIAL PRINTING CAPABILITIES INCLUDE: + + * Boldface¬  Doublå  Strike¬  Underline“  + + * Strikeout¬ Overprint (co^te) + + * SUPERScript + + * SUBScript + + * and any combination -- WordStar + + +On-screen printer-image text formatting commands include + Automatic-Centering‚ +whicè  allowó texô tï bå automaticallù centereä oî á linå witè  á � +two-strokå  command®  + + Margiî settingó caî bå changed¬ anä � +                              thå   reformatteä   texô  wilì   bå � +                              displayeä oî command® +                               +                              Selectivå    margination‚    permitó � +                              "cutting¢ arounä aî illustration® + +Á  widå rangå oæ letteò qualitù anä drafô printeró arå  supporteä � +(includinç Diablo¬  NEC¬  Qume¬  Epsoî anä  Olivetti)®  WordStar� +fullù utilizeó bidirectionaì printinç capability® + +Somå  printeró  wilì  supporô  WordStar„  commandó  whicè  specifù � +variablå linå heighô anä variablå anä alternatå characteò pitch. + +(The examples below will not be demonstrated by all printers.) + +.CW19 +This is an example of variable pitch. (.CW 19) +.CW15 +This is an example of variable pitch. (.CW 15) +.CW12 +This is an example of variable pitch. (.CW 12) +.CW11 +This is an example of variable pitch. (.CW 11) +.CW10 +This is an example of variable pitch. (.CW 10) + +.cw12 +* WordStar„  ió  á registereä trademarë oæ MicroPrï  Internationaì � +  Corporation. Š.LH 20 + This is an example of variable line height. (.LH 20) +.LH 18 + This is an example of variable line height. (.LH 18) +.LH 16 + This is an example of variable line height. (.LH 16) +.LH 14 + This is an example of variable line height. (.LH 14) +.LH 12 + This is an example of variable line height. (.LH 12) +.LH 10 + This is an example of variable line height. (.LH 10) +.LH 8 + This is an example of variable line height. (.LH 8) +.LH 6 + This is an example of variable line height. (.LH 6) +.LH 8 + +Daisù  wheeì  printeró  caî alsï bå seô tï "toggle¢  betweeî  thå � +standard 10-pitch and alternate 12-pitch printing: + + This sentence is printed with the normal 10-pitch setting, + then toggled to 12-pitch, then back to normal. + + +Tï  seå  thå embeddeä commandó whicè produceä thió  text¬  follo÷ � +thió procedure: + + - Iî responså tï thå basiã prompô froí youò system¬ enter + +        wó  + + - Wheî  thå  Openinç Menõ appearó oî  youò  screen¬  typå  D‚ � +       (ord©  tï  ediô á document®  Then¬  iî responså  tï  thå � +       requesô foò filå name¬ type + + print.tst  + +Thå  firsô  thinç yoõ wilì noticå ió thaô thå texô oî thå  screeî � +includeó somå characteró whicè dï noô appeaò oî thå printeä copy® � +Foò example: + + ï thå headinç linå ió identifieä bù á doô command¬ .hå + + o words in boldface are marked by "^B" + +Tï  continuå  viewinç PRINT.TSÔ oî youò screen¬  trù eacè oæ  thå � +followinç commandó tï scrolì througè thå file: + + CTRÌ Ã tï vie÷ thå NEXÔ fulì seô oæ lines + + CTRÌ Ò tï vie÷ thå PRECEDINÇ fulì seô oæ lines + + NOTEº Holä dowî thå CTRÌ keù whilå yoõ presó thå nexô key. + +Wå  thinë yoõ wilì finä WordStaò aî easy-to-use¬  essentiaì  tooì � +foò alì youò texô processinç needs® + \ No newline at end of file diff --git a/2006/toledo2/KERMIT/VT52.COM b/2006/toledo2/KERMIT/VT52.COM new file mode 100644 index 000000000..92f853501 Binary files /dev/null and b/2006/toledo2/KERMIT/VT52.COM differ diff --git a/2006/toledo2/KERMIT/VT52.DOC b/2006/toledo2/KERMIT/VT52.DOC new file mode 100644 index 000000000..fc9ea1460 --- /dev/null +++ b/2006/toledo2/KERMIT/VT52.DOC @@ -0,0 +1,67 @@ + VT52 is a VT52 terminal emulator written for Kaypro II and IV (non- +graphic versions). It contains the following features: + + + 1) Interrupt driven + 2) 256 byte receive buffer + 3) automatic flow control + 4) direct to video emulation of VT52 + 5) Supports application keypad + 6) Baud rate programming + 7) Break and null generation + 8) Additional escape sequences to support EMACS + + Because of 1 through 3, VT52 is able to run at high baud rates (I've +used 1 it at 4800) without losing characters. This is true even on non-sped +up Kaypros. + + Because of 4, VT52 does a much better job of emulating a VT52 than +other programs that only translate VT52 escape sequences into Kaypro escape +sequences (for example reverse line feed on VT52). + + Keypad application mode is selectable via the normal VT52 escape +sequences received from a host computer. The keypad on the Kaypro does not +have all the keys necessary to map into the VT52 keypad, so I had to choose +which keys to map where (see KAYPRO.KEY). The only key that is lost is PF2 +(normally the help key) and this can be mapped to a control key when in an +editor such as VAX's EDT. + + All features such as baud rate selection, break generation are invoked +in terminal mode of VT52 by typing ^\ followed by the appropriate key. For +a list of the commands, type ^\ ? in terminal mode. + + The escape sequences that VT52 has in addition to the normal VT52 +escape sequences were chosen to allow a much faster screen edit using EMACS. +The escape sequences are: + + ESC @ 1 - Insert space at cursor (cursor stays) + ESC @ 2 - Delete character at cursor + ESC @ 3 - Insert line at cursor line + ESC @ 4 - Delete line at cursor line + + There are some area's that still could be improved in VT52. Since +source is included, I invite anyone to do so. At present, VT52 does not do +auto wrap. It acts like a VT52 with auto wrap off (cursor stays in last +column). This presents no problem when communicating with VAX/VMS. The VAX +can be set to do the wrapping for the terminal. Also, VT52 printer escape +sequences are not emulated. That might be a nice feature (but I can't use +it so I didn't bother). + + VT52 is written in Z80 code. This was necessary to support the mode 2 +interrupts used for high speed. Block move instructions are also used in +the video code. To assemble, I used Z80MR, a public domain Z80 macro +assembler (available for Micro-Cornucopia, P.O. Box 223, Bend, Oregon +97709). To re-assemble, type Z80MR VT52.AAA (similar to ASM). The other +source files are INCLUDED by VT52.AZM. + + If anyone has problems, suggestions, questions, etc. send them to: + + Ray Rizzuto + 43 Sandra Road + Voorhees, N.J. 08043 + Compuserve ID 72765,700 + + + + + \ No newline at end of file diff --git a/2006/toledo2/KERMIT/WINSTALL.COM b/2006/toledo2/KERMIT/WINSTALL.COM new file mode 100644 index 000000000..4734c1031 Binary files /dev/null and b/2006/toledo2/KERMIT/WINSTALL.COM differ diff --git a/2006/toledo2/KERMIT/WS.INS b/2006/toledo2/KERMIT/WS.INS new file mode 100644 index 000000000..e69de29bb diff --git a/2006/toledo2/KERMIT/WSMSGS.OVR b/2006/toledo2/KERMIT/WSMSGS.OVR new file mode 100644 index 000000000..b4fb5b598 Binary files /dev/null and b/2006/toledo2/KERMIT/WSMSGS.OVR differ diff --git a/2006/toledo2/KERMIT/WSOVLY1.OVR b/2006/toledo2/KERMIT/WSOVLY1.OVR new file mode 100644 index 000000000..962fb5390 Binary files /dev/null and b/2006/toledo2/KERMIT/WSOVLY1.OVR differ diff --git a/2006/toledo2/KERMIT/WSU.COM b/2006/toledo2/KERMIT/WSU.COM new file mode 100644 index 000000000..5f7ac25b1 Binary files /dev/null and b/2006/toledo2/KERMIT/WSU.COM differ diff --git a/2006/toledo2/KERMIT/XDIR.COM b/2006/toledo2/KERMIT/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/KERMIT/XDIR.COM differ diff --git a/2006/toledo2/KPRS2.ASM b/2006/toledo2/KPRS2.ASM new file mode 100644 index 000000000..d7a60f9f0 --- /dev/null +++ b/2006/toledo2/KPRS2.ASM @@ -0,0 +1,1675 @@ +title KAYPRO RESIDENT SOFTWARE PACKAGE 2.0 , Copyright (C) 1982 NLS, Inc. +subttl Cold start and configure + aseg + ORG 0 +.comment % +######################################################## +## ## +## Cold start routine, reset and configure ## +## system for power up condition. ## +## ## +## Copyright (C) 1982 By Non-Linear Systems, Inc ## +## No warranty is made, expressed or implied. ## +## ## +######################################################## +## Last update: july 13/1982 [001] ## +## by JIM NICKERSON ## +## change list out with busy jump to ## +## to check status of serial port ## +######################################################## +% + .xlist +; extrn stack, diskinit, vidinit, devinit, print, dmaadr, dpha +; extrn home, seldsk, settrk, setsec, setdma, read, write +; extrn sectran, kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; extrn liststat, list, vidout, diskoff, diskon, thnsd + .list + .z80 + +; ROM master jump table + +jp start ; start up computer +jp diskinit ; disk initialize +jp vidinit ; video initialize +jp devinit ; device initialize + +jp home ; home selected disk drive +jp seldsk ; select a disk drive +jp settrk ; seek a track +jp setsec ; set sector number to read +jp setdma ; set dma address +jp read ; read logical sector +jp write ; write logical sector +jp sectran ; xlate sector number +jp diskon ; turn on disk +jp diskoff ; turn off disk + +jp kbdstat ; KeyBoarD character ready +jp kbdin ; input from keyboard +jp kbdout ; output to keyboard (used to ring bell) +jp ttystat ; status of serial input port +jp ttyin ; serial input +jp ttyout ; serial output +jp liststat ; list output status (Centronics) +jp list ; list output +JP TTYOSTAT ;TESTSTATUS OF SERIAL OUTPUT +jp vidout ; video output +jp thnsd ; short delay + +start: di ; stop interupts while setup + ld sp,stack ; rom stack point + ld b,10 ; a delay to let the hardware stabilize + call thnsd + call devinit ; init device sub-system + call vidinit ; init video sub-system + call diskinit ; init disk sub-system + jr bootsys ; boot system + org 66H ; nmi vector + ret ; return from "halt", NMI sequence when in rom +page +; boot system, the first sector (1) of the first track (0) +; hold system boot information. It does NOT hold a short boot routine! +; the image is: +; self: jr self ; hang if booted and run +; defw loadpt ; where to load the opsys image +; defw bios ; where to go after booting system +; defw length ; length of image in 128 byte sectors +; (* the rest of the sector is not used *) +; +; This sector image is loaded and inspected at 0FA00H during the boot process + +crlf equ 0D0AH ; new line codes +esc equ 1BH ; ascii esc +bell equ 07H ; kbd bell + +bootsys:call print + defb esc,'=',20H+10,20H+31 + DEFB '* KAYPRO II *' + defb esc,'=',20H+13,20H+20 + defb 'Please insert your diskette into Drive A',8,0 + ld c,0 + call seldsk ; select disk, set density, do home after diskinit + ld bc,0 ; set track + call settrk + ld c,0 ; read the first sector + call setsec + ld bc,0FA00H ; header sector to go here + call setdma + call read ; read sector to FA00 + di ; read does EI upon exit + or a ; trouble reading? + jr nz,booterr ; tell crt + ld bc,(0FA02H) ; where to load system image + ld (dmaadr),bc + ld bc,(0FA04H) ; where to go after loading system + push bc ; save for latter use + ld bc,(0FA06H) ; length of system in 128 byte sectors + ld b,c ; reg B holds # of sectors to load + ld c,1 ; initial sector (0 was header sector) +cb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + di ; read does EI upon exit + pop bc + or a + jr nz,booterr ; bad read of sector + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + ret z ; done booting goto system + inc c ; bump sector count + ld a,40 ; over sectors/track? + cp c + jr nz,cb1 ; fetch another sector + ld c,16 ; first sector to read on next track + push bc ; save counts + ld bc,1 ; set for next track + call settrk + pop bc + jr cb1 + +booterr:call print + defw crlf, crlf + defb bell,'I cannot read your diskette.',0 + call diskoff ; turn off disk drive +self: jr self ; hang till user pushes reset + +page +subttl Disk Equate and Parameters +.comment % +############################################################### +## ## +## Disk support routines (Deblocking) ## +## ## +############################################################### +## Last Update:06/08/82 [001] ## +############################################################### +% +.z80 + .xlist +; extrn sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; extrn sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; extrn unasec, erflag, rsflag, readop, wrtype, dmaadr +; extrn hstbuf, dsk, denflag, tracka, trackb, dirbuf +; extrn csva, alva, csvb, alvb, dpha, dphb, dpbs, dpbd, tbl1 +; extrn move, rd128, rd512, wrt128, wrt512 +; +; public home, seldsk, settrk, setsec, setdma, read, write, sectran +; public diskinit, diskon, diskoff, thnsd + .list + +bitport equ 01CH ; bit port (m80 does not support extrn bytes) +drvmask equ 0FCH ; drive select mask +denmask equ 0DFH ; density bit mask +ddbit equ 00H ; double density bit +sdbit equ 20H ; single density bit +control equ 10H ; I/O port of disk controller +status equ control+0 ; status register +cmnd equ control+0 ; command register +track equ control+1 ; track register +sector equ control+2 ; sector register +data equ control+3 ; data register +ficmd equ 11010000B ; force interrupt (Abort current command) +rdcmd equ 10000000B ; read command +wrtcmd equ 10100000B ; write command +seekcmd equ 00010000B ; seek command +rstcmd equ 00000000B ; home (restore) command +adrcmd equ 11000000B ; read track address +rdmask equ 10011100B ; read status mask +wrtmask equ 11111100B ; write status mask +tries1 equ 4 ; re-home on bad sector # of tries+1 +tries2 equ 15 ; re-read/write # of retries+1 +retcod equ 0C9H ; return op code +nmivec equ 0066H ; non-maskable interupt vector (used in rd/wt loop) +page +; This section defines the disk parameters (dph's are images moved to RAM) +dph0: defw 0,0,0,0 ; dph for unit A: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csva, alva ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + + defw 0,0,0,0 ; dph for unit B: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csvb, alvb ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + +;dpbs: ;( single density ); + defw 18 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 82 ; (dsm) max logical block # + defw 31 ; (drm) max directory # + defb 80H ; (al0) directory allocation map + defb 00H ; (al1) + defw 8 ; (cks) size of directory check vector + defw 3 ; (off) reserved tracks +;dpbd: ;( double density ); + defw 40 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 194 ; (dsm) max logical block # + defw 63 ; (drm) max directory # + defb 0F0H ; (al0) directory allocation map & BIOS space + defb 00H ; (al1) + defw 16 ; (cks) size of directory check vector + defw 1 ; (off) reserved tracks + +; sector interleave table ( single density ) +;tbl1: + defb 1,6,11,16 + defb 3,8,13,18 + defb 5,10,15,2 + defb 7,12,17,4 + defb 9,14 +enddph: +subttl Logical BIOS entry points & Deblocking +page +.8080 +;***************************************************** +;* Logical BIOS entry points * +;* Sector Deblocking Algorithms * +;***************************************************** +blksiz equ 1024 ;CP/M allocation size +hstsiz equ 512 ;host disk sector size +hstspt equ 10 ;host disk sectors/trk +hstblk equ hstsiz/128 ;CP/M sects/host buff +cpmspt equ hstblk * hstspt ;CP/M sectors/track +secmsk equ hstblk-1 ;sector mask +secshf equ 2 ;log2(hstblk) sector mask +wrall equ 0 ;write to allocated +wrdir equ 1 ;write to directory +wrual equ 2 ;write to unallocated + +single macro lbl + lda denflag + ora a + jnz lbl + endm + +diskinit: ;enter here on system boot to initialize +.z80 + ld hl,ioimage ;move rd/wrt routines into RAM + ld de,move + ld bc,imaglen + ldir + ld hl,dph0 ; set dph's + ld de,dpha + ld bc,enddph-dph0 + ldir +.8080 + xra a ;0 to accumulator + sta hstact ;host buffer inactive + sta unacnt ;clear unalloc count + mvi a,ddbit ;set double density flag + sta denflag + mvi a,255 ;set track numbers to 255 + sta dsk ;clear disk number + sta tracka + sta trackb + ret + +seldsk: ;select disk + mov a,c ;selected disk number + sta sekdsk ;seek disk number + jmp dsksel ;physical disk select (If needed to check den) + +setsec: ;set sector given by register c + mov a,c + sta seksec ;sector to seek + single secset + ret + +.z80 +setdma: ld (dmaadr),bc ;set dma address given by BC + ret + +settrk: ld (sektrk),bc ;set track given by registers BC +.8080 + single trkset + ret + +home: single dohome ; if single goto dohome + lda hstwrt ; patch by DRI + ora a + jnz homed + sta hstact +homed: jmp dohome ; go do home disk drive + +read: ;read the selected CP/M sector + single rd128 ;128 byte sector? + xra a ; a patch by DRI + sta unacnt + mvi a,1 + sta readop ;read operation + sta rsflag ;must read data + mvi a,wrual + sta wrtype ;treat as unalloc + jmp rwoper ;to perform the read + +write: ;write the selected CP/M sector + single wrt128 ;128 byte sector? + xra a ;0 to accumulator + sta readop ;not a read operation + mov a,c ;write type in c + sta wrtype + cpi wrual ;write unallocated? + jnz chkuna ;check for unalloc + +; write to unallocated, set parameters + mvi a,blksiz/128 ;next unalloc recs + sta unacnt + lda sekdsk ;disk to seek + sta unadsk ;unadsk = sekdsk + lhld sektrk + shld unatrk ;unatrk = sectrk + lda seksec + sta unasec ;unasec = seksec + +chkuna: + ;check for write to unallocated sector + lda unacnt ;any unalloc remain? + ora a + jz alloc ;skip if not + +; more unallocated records remain + dcr a ;unacnt = unacnt-1 + sta unacnt + lda sekdsk ;same disk? + lxi h,unadsk + cmp m ;sekdsk = unadsk? + jnz alloc ;skip if not + +; disks are the same + lxi h,unatrk + call sektrkcmp ;sektrk = unatrk? + jnz alloc ;skip if not + +; tracks are the same + lda seksec ;same sector? + lxi h,unasec + cmp m ;seksec = unasec? + jnz alloc ;skip if not + +; match, move to next sector for future ref + inr m ;unasec = unasec+1 + mov a,m ;end of track? + cpi cpmspt ;count CP/M sectors + jc noovf ;skip if no overflow + +; overflow to next track + mvi m,0 ;unasec = 0 + lhld unatrk + inx h + shld unatrk ;unatrk = unatrk+1 + +noovf: + ;match found, mark as unnecessary read + xra a ;0 to accumulator + sta rsflag ;rsflag = 0 + jmp rwoper ;to perform the write + +alloc: + ;not an unallocated record, requires pre-read + xra a ;0 to accum + sta unacnt ;unacnt = 0 + inr a ;1 to accum + sta rsflag ;rsflag = 1 + +;* Common code for READ and WRITE follows *; + +rwoper: + ;enter here to perform the read/write + xra a ;zero to accum + sta erflag ;no errors (yet) + lda seksec ;compute host sector + ora a ;carry = 0 + rar ;shift right + ora a ;carry = 0 + rar ;shift right + sta sekhst ;host sector to seek + +; active host sector? + lxi h,hstact ;host active flag + mov a,m + mvi m,1 ;always becomes 1 + ora a ;was it already? + jz filhst ;fill host if not + +; host buffer active, same as seek buffer? + lda sekdsk + lxi h,hstdsk ;same disk? + cmp m ;sekdsk = hstdsk? + jnz nomatch + +; same disk, same track? + lxi h,hsttrk + call sektrkcmp ;sektrk = hsttrk? + jnz nomatch + +; same disk, same track, same buffer? + lda sekhst + lxi h,hstsec ;sekhst = hstsec? + cmp m + jz match ;skip if match + +nomatch: + ;proper disk, but not correct sector + lda hstwrt ;host written? + ora a + cnz writehst ;clear host buff + +filhst: + ;may have to fill the host buffer + lda sekdsk + sta hstdsk + lhld sektrk + shld hsttrk + lda sekhst + sta hstsec + lda rsflag ;need to read? + ora a + cnz readhst ;yes, if 1 + xra a ;0 to accum + sta hstwrt ;no pending write + +match: + ;copy data to or from buffer + lda seksec ;mask buffer number + ani secmsk ;least signif bits + mov l,a ;ready to shift + mvi h,0 ;double count + dad h ;shift left 7 + dad h + dad h + dad h + dad h + dad h + dad h +; hl has relative host buffer address +.z80 + ld de,hstbuf + add hl,de ;hl = host address + ld de,(dmaadr) ;de = dma address + ld bc,128 ;length + ld a,(readop) ;which way? + or a + jr nz,rwmove ;skip if read + +; write operation, mark and switch direction + ld a,1 + ld (hstwrt),a ;hstwrt = 1 + ex de,hl ;source/dest swap + +rwmove: call move ;move a logical sector to/from buffer + +.8080 +; data has been moved to/from host buffer + lda wrtype ;write type + cpi wrdir ;to directory? + lda erflag ;in case of errors + rnz ;no further processing + +; clear host buffer for directory write + ora a ;errors? + rnz ;skip if so + xra a ;0 to accum + sta hstwrt ;buffer written + call writehst + lda erflag + ret + +;* Utility subroutine for 16-bit compare *; + +sektrkcmp: ;HL = .unatrk or .hsttrk, compare with sektrk +; .z80 +; ld bc,(sektrk) +; or a ; clear carry +; sbc hl,bc ; hl=hl-bc +; ret ; return status + xchg + lxi h,sektrk + ldax d ;low byte compare + cmp m ;same? + rnz ;return if not +; low bytes equal, test high 1s + inx d + inx h + ldax d + cmp m ;sets flags + ret +subttl Physical disk routines +page +.z80 +; select disk drive, C=drive number 0=A:, 1=B: +; return HL=dph for selected drive, or HL=0 for non-existent drive +dsksel: ld hl,0 ; hl = 0 for non-existent drive + ld a,c + cp 2 + ret nc ; drive number >B: + or a ; zero flag set => A: drive else B: drive + ld hl,dpha ; select proper dph for drive + jr z,sel0 + ld hl,dphb +sel0: ld a,(dsk) ; selecting disk already selected? + cp c + ret z ; yes, no further action needed + ld a,c ; save new disk number + ld (dsk),a + or a ; set zero flag if A: drive + push hl ; hl=dph of disk to be selected + ld de,16 ; to density bit in dph + add hl,de + ld a,(hl) ; move into A then store into denflag + ld (denflag),a + ld hl,trackb ;now find proper track(x) + jr z,sel1 + dec hl +sel1: ld a,(hl) ; have we been on the disk we are "leaving" + cp 255 ; if not do not update trackx + jr z,selnot + in a,(track) + ld (hl),a ; save track of disk we are leaving +selnot: ld a,c ; set zero flag if A: drive + or a + ld hl,tracka + jr z,sel2 + inc hl +sel2: ld a,(hl) + out (track),a ; track of disk we are selecting + ex de,hl + pop hl ; address of dph for disk we are selecting +density:cp 255 ; first time for this drive? + ret nz ; need to check density? + call ready ; physical disk select + call home ; seek track 0 + in a,(bitport) ; test double density first + and denmask ; or in density flag + or ddbit ; set density flag + out (bitport),a + call dcheck ; see if we can read address + jr z,dend ; density is double? + in a,(bitport) ; set density flag to single + and denmask + or sdbit + out (bitport),a + call dcheck ; see if we can read address + ret nz ; can't read single or double so don't change + jr dens +dend: push hl ; (* double density *) hl^ to dph + push de + ld de,0 ; no xlate table (done by FORMAT program) + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbd ; double density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,ddbit ; double density bit flag + ld (hl),a + ld (denflag),a + jr den1 ; exit +dens: push hl ; (* single density *) hl^ to dph + push de + ld de,tbl1 ; single density sector xlate table + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbs ; single density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,sdbit ; single density bit flag + ld (hl),a + ld (denflag),a +den1: pop de ; restore pointer to dph + pop hl ; pointer to track(x) bios register + in a,(sector) ; update track register + out (track),a + ld (de),a + ret +dcheck: ld a,adrcmd ; get address command + out (cmnd),a ; issue command to controller + call busy ; wait for command done + bit 4,a ; record not found flag + ret ; return status + +; home disk head +dohome: call ready ; make sure drive is on and ready + ld a,rstcmd; restore command + out (cmnd),a; issue command + jr busy ; test and wait for not busy + +; seek track #, BC=Track # +trkset: call ready ; make sure drive is on and ready + ld a,c ; move track number to A + out (data),a ; track # to seek to + ld a,seekcmd ; seek command + out (cmnd),a ; issue command + jr busy ; test and wait for not busy + +; select sector #, BC=Sector # +secset: ld a,c ; move sector number to A + out (sector),a ; to controller register + ret + +; perform logical to physical sector translation. +; logical sector number in BC, table address in DE +; return physical sector number in HL +sectran:ld a,d ; table address 0? + or e + ld h,b ; if so no xlate + ld l,c + ret z + ex de,hl ; table address in hl + add hl,bc ; index by logical sector number + ld l,(hl) + ld h,0 + ret + +; ready disk drive, perform physical disk select, set density bit +ready: push hl ; save hl + push de ; and de + push bc + ld a,ficmd ; abort any controller action + out (cmnd),a + call diskon ; turn drive motor on + ld a,(dsk) ; A=drive # + ld e,a ; save drive # in E + in a,(bitport) ; A=bit port + and 0FCH ; strip current drive bits + or e ; or in requested drive + inc a ; bump, 01=A: 10=B: + and denmask ; set density bit + ld hl,denflag ; hl^ to density bit for this drive + or (hl) + out (bitport),a ; to bit port + pop bc + pop de + pop hl + ret + +; turn disk motor on, delay for drive speed +diskon: in a,(bitport) ; get current drive motor status + bit 6,a ; is motor on? + ret z ; motor on, do nothing + res 6,a ; motor on bit + out (bitport),a ; turn motor on + ld b,50 ; delay + call thnsd + ret + +; turn disk motor off +diskoff:in a,(bitport) + set 6,a ; motor off bit + out (bitport),a + ret +; delay for B th's @ 4Mhz +thnsd: ld de,1670 +tlp: dec de + ld a,d + or e + jp nz,tlp + djnz thnsd + ret + +; check status of controller, wait for command to finish executing +busy: halt ; wait for command done +bsy: in a,(status) ; now wait for not busy + bit 0,a + jr nz,bsy + ret +subttl Writehst and Readhst logical to Physical routines +page +;* WRITEHST performs the physical write to *; +;* the host disk, READHST reads the physical *; +;* disk. *; + +writehst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. write "hstsiz" bytes + ;from hstbuf and return error flag in erflag. + ;return erflag non-zero if error + ld de,tries1*256+tries2 ; retry error counts +wrthst: push de ; save error counts + call hstcom ; set track and sector + call wrt512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,wrthst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr wrthst + +readhst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. read "hstsiz" bytes + ;into hstbuf and return error flag in erflag. + ld de,tries1*256+tries2 ; retry error counts +rdhst: push de ; save error counts + call hstcom ; set track and sector + call rd512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,rdhst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr rdhst + +hstcom: ld a,(hstdsk) ; select disk + ld c,a + call dsksel + ld bc,(hsttrk) ; set track to hsttrk + call trkset ; physical seek + ld a,(hstsec) ; set physical sector + ld c,a ; c=sector + call secset + ret +subttl Physical disk I/O, RAM image +page +ioimage: +;move: ; block memory move, turn rom on/off + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + ldir ; move logical sector from hstbuf + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ret ; back to rom + +;rd128: + ld hl,(dmaadr) ; address of operation + ld b,1 ; read a 128 byte sector + jr rd +;rd512: + ld hl,hstbuf + ld b,4 ; read a 512 byte sector +; read a sector, return A=0 for no errors, A=1 for non-recoverable error +; if b=1 128, b=2 256, b=3 384, b=4 512 bytes/sector +rd: ld de,rdmask*256+rdcmd ; d=read status mask, e=read command + jr action + +;wrt128: + ld hl,(dmaadr) + ld b,1 ; write a 128 byte sector + jr wrt +;wrt512: + ld hl,hstbuf + ld b,4 ; write a 512 byte sector +; write a sector, return as per read +wrt: ld de,wrtmask*256+wrtcmd ; d=status mask, e=write command + ;fall through to action + +action: call ready ; make sure drive is on and ready + di ; no interrupts during disk I/O operations + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + push hl ; save address of disk buffer + ld hl,nmivec ; set up nmi vector + ld a,(hl) ; save current contents + ex af,af' + ld (hl),retcod ; this is a return after HALT in loop + pop hl ; hl = dma address + ld a,b ; sector multiple + ld bc,128*256+data ; b=sector length, c=data port + bit 0,a ; if 0 then 256 or 512 bytes/sector + jr nz,actn ; b set for 128 or 384 bytes/sector + ld b,0 ; b set for 256 or 512 bytes/sector +actn: cp 1 ; compute entry point 1st or 2nd loop + push psw ; save as Z flag + ld a,e ; i/o command + cp wrtcmd ; a write? + jr z,wstart ; start write command + + out (cmnd),a ; fall through to read loop + pop psw + jr z,rl2 +rl1: halt ; wait for controller + ini + jr nz,rl1 +rl2: halt + ini + jr nz,rl2 + jr done ; read loop done, exit + +wstart: out (cmnd),a ; write loop + pop psw + jr z,wl2 +wl1: halt + outi + jr nz,wl1 +wl2: halt + outi + jr nz,wl2 + +done: ex af,af' ; byte at nmi vector address + ld (nmivec),a ; restore it + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ei ; turn interrupts on + call busy ; get status when contoller not busy + and d ; status mask + ret z ; no bit set, return operation ok + ld a,1 ; cp/m error return + ret + +imaglen equ $-ioimage ; length of this image +page +subttl SIO, PIO, and CTC equates +.comment % +############################################################### +## ## +## System device I/O routines for KBD, TTY and LST ## +## ## +############################################################### +## LAST UPDATE: JULY 7,1982 [001] ## +## BY JIM NICKERSON ## +## CHANGED SIOA REGISTER 3 INIT TO AUTO ENABLE ## +## ADDED LIST STATUS FOR THE SERIAL PORT ## +## TTYOUT NOW THE SAME AS OUT WITH STATUS CHK ## +## CHANGE VECTOR PAD MAPING ## +############################################################### +% +.z80 +.xlist +; public kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; public liststat, list, devinit + .list + +;*************** +;* sio equates * +;*************** + +sio equ 04H ; base address of sio +sioa0 equ sio+2 ; channel a command/status +sioa1 equ sio+0 ; channel a data +siob0 equ sio+3 ; channel b command/status +siob1 equ sio+1 ; channel b data + +; write registers 0-7 and control bits +; init registers in the following order 0,2,4,3,5,1 + +WR0 equ 0 ; command register, crc reset, reg pointer +; bits 0-2 are register pointers to WRx and RRx +; bits 3-5 and commands as given bellow +null equ 0 ; null command +extrset equ 10H ; reset ext/status interrupts +reset equ 18H ; channel reset +ienrc equ 20H ; Enable Int on Next Rx Character +rtip equ 21H ; reset transmitter interrupt pending +errset equ 30H ; error reset +retint equ 31H ; return from interrupt + +WR1 equ 1H ; interrupt enable and Wait/Ready modes +esie equ 1H ; external/status interrupt enable +tie equ 2H ; transmitter interrupt enable +tid equ 0 ; transmitter interrupt disable +statav equ 4H ; Status affects vector (z80 mode 2) (see WR2) +; bits 3-4 affect receive interrupt mode +rid equ 0 ; receive interrupts disabled +rifc equ 8H ; receive interrupt on first char only +riep equ 10H ; recv interrupts enabled, parity err Special Recv Cond +rie equ 18H ; same as riep but parity error not Special Recv Cond + +WR2 equ 2 ; interrupt vector address/pointer (chan b only) +; interrupt address (z80 reg I+WR2=interrupt address) +; returned as is if not statav above in wr1 +; if statav then bits 1-3 are modified as bellow: +; 000 ch b transmit buffer empty +; 001 ch b external/status change +; 010 ch b receive char available +; 011 ch b special receive condition (parity error, Rx overrun, +; framing error, end of frame(sdlc) ) +; 1xx ch a (* same vectors as for channel b above *) + +WR3 equ 3 ; receiver logic control and parameters +re equ 1 ; receiver enable +autoe equ 20H ; auto enable (use dcd and cts to enable recv and xmt +; bits 6-7 are receiver bits/character +rbits5 equ 0 ; 5 bits/character +rbits7 equ 40H ; 7 bits/character +rbits6 equ 80H ; 6 bits/character +rbits8 equ 0C0H ; 8 bits/character + +WR4 equ 4 ; control bits that affect both xmt and recv +pon equ 1 ; enable parity (parity on) +pstate equ 2 ; parity even not pstate = parity odd +; bits 2-3 are number of stop bits +syncmd equ 0 ; sync mode is to be selected +sbits1 equ 4 ; 1 stop bit +sbits5 equ 8H ; 1.5 stop bits +sbits2 equ 0CH ; 2 stop bits +; bits 6-7 control clock rate +cr1 equ 0 ; data rate x1=clock rate +cr16 equ 40H ; x16 +cr32 equ 80H ; x32 +cr64 equ 0CH ; x64 + +WR5 equ 5 ; control bits that affect xmt +te equ 8H ; transmit enable +break equ 10H ; send break +; bits 5-6 are number of bits/character to transmit +tbits5 equ 0 ; 5 or less bits/character +tbits7 equ 20H ; 7 bits/character +tbits6 equ 40H ; 6 bits/character +tbits8 equ 60H ; 8 bits/character +rts equ 2 ; RTS output +dtr equ 80H ; DTR output + +WR6 equ 6 ; sdlc transmit sync character +WR7 equ 7 ; sdlc receive sync character + +; read registers 0-2 and status bits +rr0 equ 0 ; general recv and xmt status +rca equ 1 ; receive character available +intped equ 2 ; interrupt pending (ch a only) +tbe equ 4 ; transmit buffer empty +synhnt equ 10H ; sync/hunt +dcd equ 8H ; DCD input +cts equ 20H ; CTS input +xmtundr equ 40H ; transmit underrun/ EOM +brk equ 80H ; break/abort status + +rr1 equ 1 ; Special Receive conditions and Residue codes +; bits 4-7 are special receive conditions +rpe equ 10H ; parity error +rovr equ 20H ; Rx overrun error +framerr equ 40H ; framing error + +rr2 equ 2 ; interrupt vector address/pointer + +;*************** +;* pio equates * +;*************** + +pio equ 08H ; base address of pio +pioac equ pio+1 ; pio a control +pioad equ pio+0 ; pio a data +piobc equ pio+3 ; pio b control +piobd equ pio+2 ; pio b data + +spio equ 01CH ; base address of pio (system status bits port) +spioac equ spio+1 ; pio a control +spioad equ spio+0 ; pio a data +spiobc equ spio+3 ; pio b control +spiobd equ spio+2 ; pio b data + +bitport equ spioad ; system bit port for status and control +;0 drive sel A: +;1 drive sel B: +;2 n/c +;3 centronics i/o ready line +;4 centronics i/o data strobe +;5 single density (not 5 is double density) +;6 drive motor off (not 6 is motor on) +;7 rom enable (not 7 is rom off) + +; control register +setiv equ 0 ; set interrupt vector, bits 1-7 are vector address + +som equ 0FH ; set operating mode. bits 6-7 specify mode +mode0 equ 0 ; output +mode1 equ 40H ; input +mode2 equ 80H ; bidirectional +mode3 equ 0C0H ; control (bit by bit i/o, mode3 command is followed by + ; byte where bit pattern specifies i/o bits + ; 1=input, 0=output + +sicw equ 7H ; set interrupt control word, bits 4-7 are parameters +imask equ 10H ; bit mask follows ) +hghlow equ 20H ; high/low ) mode 3 only +andor equ 40H ; and/or of bits to gen interrupt ) +intena equ 80H ; enable interrupt (bit low disable interrupts) + +intcmd equ 03H ; set interrupt enable/disable without changing status as sicw + +;*************** +;* ctc equates * +;*************** + +ctc equ 18H ; ctc base address +ctc0 equ ctc+0 ; ctc channel 0 +ctc1 equ ctc+1 ; ctc channel 1 +ctc2 equ ctc+2 ; ctc channel 2 +ctc3 equ ctc+3 ; ctc channel 3 + +; channel control register bits +ctccmd equ 01H ; ctc command byte +ctcint equ 80H ; interrupt enable +ctcm1 equ 40H ; set ctc mode is counter +ctcm0 equ 00H ; set ctc mode is timer +range equ 20H ; timer prescaler factor is 256 (not range is 16) +slope equ 10H ; edge triger positive (not slope is negative edge) +trigger equ 8H ; ext trigger +ltc equ 4H ; load time constant (followed by time constant) +rsetctc equ 2H ; reset channel + +ctcivec equ 0 ; set ctc interrupt vector, bits 3-7 are vector addr +ctcvmsk equ 0F8H ; interrupt vector mask to strip bits 0-2 + +;*************** +;* baud rate * +;*************** + +bauda equ 00H ; baud rate generator for serial chan a +baudb equ 0CH ; baud rate generator for serial chan b + +; baud rate factors, output to baudx to select baud rate +baud10 equ 02H ; 110 baud rate +baud30 equ 05H ; 300 baud rate +baud12 equ 07H ; 1200 baud rate +baud24 equ 0AH ; 2400 baud rate +baud48 equ 0CH ; 4800 baud rate +baud96 equ 0EH ; 9600 baud rate +baud19k equ 0FH ; 19.2k baud rate +subttl I/O configuration tables +page +iotabint: ; i/o device initialization table + ; first byte is port # + ; second byte is byte to send to port + defb (iotblend-iotabint)/2 ; table length in arguments + +; init sio channel b +defb siob0, reset ; reset sio channel +defb baudb, baud30 ; 300 baud +defb siob0, wr4 +defb siob0, sbits1 or cr16 ; one stop bit, 16x clock +defb siob0, wr3 +defb siob0, re or rbits8 ; recv enable, 8 bits/char +defb siob0, wr5 +defb siob0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb siob0, wr1 +defb siob0, tid or rid ; xmt & recv interrupts disabled + +; init sio channel a +defb sioa0, reset ; reset sio channel +defb bauda, baud30 ; 300 baud +defb sioa0, wr4 +defb sioa0, sbits1 or cr16 ; one stop bit, 16x clock +defb sioa0, wr3 +defb sioa0, re or rbits8 or autoe ; recv enable, 8 bits/char, auto enable +defb sioa0, wr5 +defb sioa0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb sioa0, wr1 +defb sioa0, tid or rid ; xmt & recv interrupts disabled + +; init pio used form system control bits +defb spioac, intcmd ; disable interrupts +defb spioad, 10000001B ; set system status bits (before setting mode!) +defb spioac, som or mode3 ; set mode to #3 +defb spioac, 00001100B ; bit pattern for mode 3 + +; init pio used to drive printer +defb pioac, intcmd ; disable interrupts +defb pioac, som or mode0 ; set mode to #0 (output) +defb piobc, intcmd ; disable interrupts +defb piobc, som or mode1 ; set mode to #1 (input) +iotblend: ; end of table + +devinit:ld hl,iotabint ; initialize i/o devices + ld b,(hl) ; number of bytes to send to i/o devices +iolp: inc hl + ld c,(hl) ; port to send + inc hl + ld a,(hl) ; byte to send + out (c),a + djnz iolp + ret ; done +subttl Device I/O handlers +page +kbdstat:in a,(siob0) ; kbd char avail? + and rca + ret z ; 0=no char + ld a,0FFH ; FF=char avail + ret + +kbdin: call kbdstat ; loop till char avail + jr z,kbdin + in a,(siob1) ; get char + call kbdmap ; map out funny chars of vector pad and #'s + ret + +kbdout: in a,(siob0) ; xmit buffer empty? + and tbe + jr z,kbdout + ld a,c ; out character + out (siob1),a + ret + +kbdmap: ld hl,mapin ; input map table + ld bc,mapout-mapin ; table length + cpir ; search table + ret nz ; not found + ld de,mapin ; make hl=table index + or a ; hl-mapin=index + sbc hl,de + ld de,mapout-1 ; index + add hl,de + ld a,(hl) ; get char from mapout + ret + +mapin: defb 0F1H, 0F2H, 0F3H, 0F4H ; up, down, left, right arrows + defb 0B1H, 0C0H, 0C1H, 0C2H ; 0,1,2,3 + defb 0D0H, 0D1H, 0D2H, 0E1H ; 4,5,6,7 + defb 0E2H, 0E3H, 0E4H, 0D3H ; 8,9, '-', ',' + defb 0C3H, 0B2H ; return, '.' + defb 0FFH ; end of mapin table +mapout: defb 80H, 81H, 82H, 83H ; vector pad, xlate in bios + defb 84H, 85H, 86H, 87H + defb 88H, 89H, 8AH, 8BH + defb 8CH, 8DH, 8EH, 8FH + defb 90H, 91H + +ttystat:in a,(sioa0) ; serial port status input + and rca + JR COMOUT + +ttyin: call ttystat ; is a char ready? + jr z,ttyin + in a,(sioa1) + ret + +ttyout: in a,(sioa0) ; output a char to serial port + and tbe + jr z,ttyout ; xmit buffer full? + ld a,c + out (sioa1),a ; xmit character + ret + +; +TTYOSTAT: ;TEST STATUS OF SERIAL OUTPUT + IN A,(SIOA0) + AND TBE ;TX BUF FULL ? + JR COMOUT +; +; list port centronics equates +pready equ 3 ; bit in bit port +pstrob equ 4 ; bit in bit port + +liststat:in a,(bitport) ; centronics printer port status + bit pready,a +COMOUT: ret z ; 0=busy + ld a,0FFH ; FF=ready + ret + +list: call liststat ; is printer busy? + jr z,list + ld a,c + out (pioad),a ; output char to printer + in a,(bitport) ; strb. printer + set pstrob,a + out (bitport),a + res pstrob,a + out (bitport),a + ret + +page +subttl Memory maped video output driver +.comment % +################################################################## +## ## +## Memory maped video output driver ## +## ## +################################################################## +## Last Update : july 13 1982 ## +## by jim nickerson ## +################################################################## +% +; +.xlist +; extrn leadflg, row, cursor, chrmsk, kbdout +; public vidout, vidinit, print +.list + +.z80 +jmpif macro j,k ;SHORT JUMP + cp j + JR z,k + endm +; +LJMPIF macro j,k ;LONG JUMP + cp j + jp z,k + endm + + +colcp macro x + ld a,l + and not colum-1 + cp x + endm + +SPACE equ 20H ; space char +cr equ 0DH ; move cursor to beginning of line +bs equ 08H ; move cursor left (control h) +fs equ 0CH ; move cursor right (control l) +lf equ 0AH ; move cursor down (control j) +rlf equ 0BH ; move cursor up (control k) +eol equ 18H ; clear to end of line (control x) +eos equ 17H ; clear to end of screen (control w) +clr equ 1AH ; clear screen char (control z) +homec equ 1EH ; home cursor +esc equ 1BH ; escape, lead-in character +bell equ 07H ; ascii bell +curchr equ '_' or 80H ; character for cursor +ascii equ 7FH ; ascii mask +greek equ 1FH ; greek character set mask + +base equ 03000H ;start of video ram +linlen equ 80 ;logical line length +colum equ 128 ;physical line length +lines equ 24 ;lines per display +line1 equ base ;start of first line +line2 equ base+colum ;start of second line +last1 equ base+(lines-1)*colum ;start of last line +last equ (base+lines*colum)-1 ;last char of display +bitport equ 1CH ;system bit port + +vidinit:ld a,space ; clear row # + ld (row),a + call clear ; clear screen and home cursor + ld (cursor),hl + xor a + ld (leadflg),a ; no leadin sequence + ld a,17H ; re-set scroll register + out (14H),a + ld a,ascii ; set ascii mask + ld (chrmsk),a + ret + +vidout: + ld a,(leadflg) ; processing a lead-in sequence? + or a + jp nz,leadin + ld a,bell ; ring bell, no display? + cp c + JR nz,nobell + ld c,04H ; kbd bell code + jp kbdout ; ring bell + +nobell: call clrcur ; clear (remove) cursor + ld de,finsh ; set up return to finish + push de + ld a,c ; char to print + jmpif lf,lfcd ; line feed (down arrow) + LJMPIF cr,return ; return + jmpif bs,back ; back space (left arrow) + jmpif fs,fowrd ; right arrow + jmpif rlf,up ; up arrow + LJMPIF esc,doesc ; lead-in + LJMPIF eol,cleol ; clear to eol + jmpif eos,cleos ; clear to eos + jmpif clr,clear ; clear screen, home currsor + jmpif homec,hmcsr ; home cursor + cp 60H ; lower case? + jr c,vout + ld a,(chrmsk) ; if lower do we print greek chr set? + and c +vout: ld (hl),a ; display character + inc hl ; inc cursor position + ld a,l ; off end of line? + and not colum + cp linlen ; logical line length + ret c ; not past colum-1 + call return + jr lfcd + +vovr: ld de,last ; off display memory? + ld a,d + cp h + jr c,scroll + ret nz + ld a,e + cp l + ret nc +scroll: ld b,lines-1 ; number of lines to scroll + ld hl,line2 + ld de,line1 +scr1: push bc ; save line count + ld bc,linlen ; logical line length + ldir ; scroll one line + ld bc,colum-linlen ; to beginning of next line + add hl,bc + ex de,hl + add hl,bc + ex de,hl + pop bc ; line count + djnz scr1 ; do another line + ld hl,last1 ; to last line of display + JR cleol ; clear it + +; +; process a line feed (cursor down) +; +lfcd: ld de,colum ; to next line, same column + add hl,de + JR vovr +; +; back space the cursor +; +back: ld a,l ; is column # 0? + and not colum + ret z ; at beginning of line + dec hl ; back space + ret +; +; move cursor foward +; +fowrd: ld a,l ; right most column? + and 07FH ;INSTEAD OF not colum-1 + cp 79 + ret nc + inc hl ; bump cursor address + ret +; +; move cursor up one line +; +up: push hl ; save current position + ld de,-colum ; move up one line + add hl,de + push hl ; save new cursor position + or a ; clear carry + ld de,line1 ; first char of display + sbc hl,de ; if carry set we are off display + pop hl ; hl = new pos + pop de ; de = old pos + ret nc + ex de,hl + ret +; +; clear screen +; +clear: ld hl,line1 ; clear screen + ld de,line1+1 + ld bc,last-base + ld (hl),space + ldir + ld hl,line1 ; home cursor + ret +; +; home cursor +; +hmcsr: ld hl,line1 ; line one of display + ret +; +; clear to end of screen +; +cleos: +; patch by jim + push hl ;save current position + call cleol + ld de,colum + ld a,l + and 080H + ld l,a + add hl,de ;begining of next line + ld a,03CH ;after last line now ? + cp h ;h holds page (3B) is last line + jr z,cleos1 ;yes so no more to blank get out +; + ld e,l ; copy hl to de + ld d,h + or a ; clear carry + ld hl,last ; last pos of screen + sbc hl,de ; last-current position + ld c,l ; move count to bc + ld b,h + ld h,d ; move current position into hl + ld l,e + inc de + ld (hl),space + ldir +; +;patch by jim +cleos1: +; + pop hl ; restore cursor position + ret +; +; clear to end of line +; +cleol: +; +;patch by jim +; + ld a,l + and 07FH + cp linlen-1 + jr c,cleol1 + ld (hl),space + ret +cleol1: +; +; + push hl ; save current position + push hl + ld a,l ; find beginning of line + and not colum-1 + ld l,a +; +;patch by jim + ld de,linlen-1 +; + add hl,de ; hl points to end of line + pop de ; current position in de + push de + or a ; clear carry + sbc hl,de ; hl=# of bytes to clear + ld c,l ; move count into bc + ld b,h + pop hl ; current position + ld e,l ; copy to de + ld d,h + inc de + ld (hl),space + ldir + pop hl ; restore cursor address + ret + +clrcur: ld hl,(cursor) ; get cursor location + ld a,(hl) ; undo cursor + cp curchr ; is it a cursor on a blank field? + ld a,space + jr nz,clr1 + ld (hl),a +clr1: res 7,(hl) ; undo cursor + ret +; +; process a return +; +return: ld a,l + and not colum-1 + ld l,a + ret +; +; escape lead-in sequence start up +; +doesc: ld a,1 ; leadflg is a counter of chars processed + ld (leadflg),a + ret +; +; process second, third and fourth characters of lead-in sequence +; +leadin: ld hl,exit ; fake ret to exit + push hl + ld hl,leadflg + ld (hl),0 ; clear lead-in counter in case error + cp 1 ; second char? (leadflg=1 processed first char) + jr nz,l1 + ld a,c ; what type of esc sequence? + res 7,a + cp 'G' ; greek character set? + jr z,dogreek + cp 'A' ; ascii character set? + jr z,doascii + cp 'R' ; delete line? + jr z,dodel + cp 'E' ; insert line? + jr z,doinst + cp '=' ; esc = sequence (cursor positioning) + ret nz ; error, exit + ld (hl),2 ; have processed second character of sequence + ret +l1: cp 2 ; third character? + jr nz,l2 + ld a,c ; row number+space + ld (row),a ; save for later use + ld (hl),3 ; have processed third character + ret +l2: cp 3 ; fourth character? + ret nz ; error, leadflg trashed by someone + + call clrcur ; remove cursor then move it + pop hl ; ret to exit not needed + ld hl,line1 ; process col # + ld a,c + sub ' ' ; remove ascii space bias +;patch by jim +; +l3: sub linlen +; + jr nc,l3 + add a,linlen + ld l,a + ld a,(row) + sub ' ' ; remove ascii space bias +l4: sub lines ; range 0 - lines + jr nc,l4 + add a,lines + ld de,colum ; add column to cursor pos till +l5: jp z,finsh ; # lines = 0 + add hl,de + dec a + jr l5 +; +FINSH: LD A,(HL) ; MAKE A CURSOR + CP SPACE ; SPACE + JR NZ,FIN1 ; IF SO THEN SPECIAL CURSOR CHAR + LD A,CURCHR +FIN1: SET 7,a + ld (hl),a + ld (cursor),hl ; save location +exit: ret ; all done + +; +; switch from ascii to greek +; +dogreek:ld a,greek ; greek char mask + ld (chrmsk),a + ret +; +; switch from greek to ascii +; +doascii:ld a,ascii ; ascii mask + ld (chrmsk),a + ret +; +; delete line, scroll up to current line, blank 24'th line +; +dodel: pop hl ; ret to exit not needed + call setup ; setup cpu regs for ldir + push de ; current line + jr z,delscr ; if setup set Z flag no scroll + ldir +delscr: ld hl,last1 ; blank last line + call cleol + pop hl ; current line + JR finsh +; +; insert a blank line at current row address, 24'th line lost +; +doinst: pop hl ; ret to exit not needed + call setup + push de ; current line + jr z,inscr ; no scroll + ld de,last1+127 + ld hl,last1-1 + lddr +inscr: pop hl ; current line + push hl + call cleol ; clear it + pop hl ; current row, colum=0 + JR finsh + +setup: call clrcur ; get current cursor position + call return ; to beginning of line + push hl ; save it + ex de,hl ; compute amount to move + ld hl,last1 ; last line of display + or a + sbc hl,de + ld b,h ; bc=length + ld c,l + pop hl ; current pos + push hl + ld de,128 ; set a pointer to beginning of next line + add hl,de ; hl=current+128 (next line) + pop de ; de=current + ld a,b ; is bc zero + or c + ret + +print: ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call vidout + jr print + defb 0FFH ; because L80 tends to drop the last byte + +page +subttl RAM storage +.comment % +############################################################### +## ## +## System scratch RAM used by ROM software ## +## ## +############################################################### +## Last Update:05/31/82 [001] ## +############################################################### +% +.z80 +.xlist +; public sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; public sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; public unasec, erflag, rsflag, readop, wrtype, dmaadr +; public hstbuf, dsk, denflag, tracka, trackb, dirbuf, move +; public csva, alva, csvb, alvb, dpha, dphb, rd128, rd512 +; public leadflg, row, cursor, chrmsk, wrt128, wrt512, stack +; public dpbs, dpbd, tbl1, tbl2 +.list + +ramscratch equ 0FC00H ; scratch ram + +sekdsk equ ramscratch ;seek disk number +sektrk equ sekdsk+1 ;seek track number +seksec equ sektrk+2 ;seek sector number +hstdsk equ seksec+1 ;host disk number +hsttrk equ hstdsk+1 ;host track number +hstsec equ hsttrk+2 ;host sector number +sekhst equ hstsec+1 ;seek shr secshf +hstact equ sekhst+1 ;host active flag +hstwrt equ hstact+1 ;host written flag +unacnt equ hstwrt+1 ;unalloc rec cnt +unadsk equ unacnt+1 ;last unalloc disk +unatrk equ unadsk+1 ;last unalloc track +unasec equ unatrk+2 ;last unalloc sector +erflag equ unasec+1 ;error reporting +rsflag equ erflag+1 ;read sector flag +readop equ rsflag+1 ;1 if read operation +wrtype equ readop+1 ;write operation type +dmaadr equ wrtype+1 ;last dma address +hstbuf equ dmaadr+2 ;host buffer +dsk equ hstbuf+512 ; current disk drive +denflag equ dsk+1 ; density flag for current drive +tracka equ denflag+1 ; track of disk A (255=density unknown) +trackb equ tracka+1 ; track of disk B +csva equ trackb+1 ; directory check +alva equ csva+16 ; allocation map +csvb equ alva+25 +alvb equ csvb+16 +leadflg equ alvb+25 ; video leadin sequence count +row equ leadflg+1 ; temp store of rom number +cursor equ row+1 ; cursor address +chrmsk equ cursor+2 ; ascii/greek character set switch +dpha equ chrmsk+1 ; DPH for A +dphb equ dpha+17 ; DPH for B +dpbs equ dphb+17 ; single density dpb +dpbd equ dpbs+15 ; double density dpb +tbl1 equ dpbd+15 ; single density skew table +tbl2 equ tbl1+18 ; 512 byte sector skew table +move equ tbl2+10 ; move logical sector from hstbuf +rd128 equ move+15 ; routine to read 128 byte sector +rd512 equ rd128+7 ; routine to read 512 byte sector +wrt128 equ rd512+10 ; routine to write 128 byte sector +wrt512 equ wrt128+7 ; routine to wrtie 512 byte sector +rdwrtend equ rd128+150 ; end of read and write routines +dirbuf equ rdwrtend+1 ; bdos directory buffer + +stack equ 0FFFFH ; boot up stack space + end + \ No newline at end of file diff --git a/2006/toledo2/LOAD.COM b/2006/toledo2/LOAD.COM new file mode 100644 index 000000000..b9601e002 Binary files /dev/null and b/2006/toledo2/LOAD.COM differ diff --git a/2006/toledo2/MASTER/CPMADR.COM b/2006/toledo2/MASTER/CPMADR.COM new file mode 100644 index 000000000..5a4804cba Binary files /dev/null and b/2006/toledo2/MASTER/CPMADR.COM differ diff --git a/2006/toledo2/MASTER/CPMKAYPR.COM b/2006/toledo2/MASTER/CPMKAYPR.COM new file mode 100644 index 000000000..dd7ea00b8 Binary files /dev/null and b/2006/toledo2/MASTER/CPMKAYPR.COM differ diff --git a/2006/toledo2/MASTER/DU2.COM b/2006/toledo2/MASTER/DU2.COM new file mode 100644 index 000000000..907e02fbf Binary files /dev/null and b/2006/toledo2/MASTER/DU2.COM differ diff --git a/2006/toledo2/MASTER/FILTER.COM b/2006/toledo2/MASTER/FILTER.COM new file mode 100644 index 000000000..5640613d5 Binary files /dev/null and b/2006/toledo2/MASTER/FILTER.COM differ diff --git a/2006/toledo2/MASTER/FILTER.DOC b/2006/toledo2/MASTER/FILTER.DOC new file mode 100644 index 000000000..120fdacbb --- /dev/null +++ b/2006/toledo2/MASTER/FILTER.DOC @@ -0,0 +1,18 @@ + FILTER.DOC ver 1.1 + by Keith Petersen, W8SDZ + (revised 1/27/81) + +This program copies any ASCII file and filters out (ignores) +all control characters except CR, LF, and TAB. It also sets +the high order bit of all characters to zero so that files +created with WordStar or other text processing programs can +be read by MBASIC. The filtered copy of the of the file is +created as 'FILTER.FIL' on the default drive. The source +file is left intact. If the original file's EOF (1AH) is +not at the physical end of the last sector, this program +will pad the last sector with EOF's. This is useful for +'cleaning up' a file which was originally created by MBASIC +or text editors which do not pad the last sector with EOF's. + +Command: FILTER [drive:] + \ No newline at end of file diff --git a/2006/toledo2/MASTER/FILTER.FIL b/2006/toledo2/MASTER/FILTER.FIL new file mode 100644 index 000000000..4e015d391 --- /dev/null +++ b/2006/toledo2/MASTER/FILTER.FIL @@ -0,0 +1,57 @@ +REQUIREMENT: This facility is required to increase the +capability to test, evaluate, and improve avinics systems and +reduce flight testing costs. Rapid advances in avionics have +caused an increasing need for sophisticated avionics ground test +and evaluation facilities to support aircraft avionic systems +flight test programs. + +CURRENT SITUATION: The existing facility has the capability to +support four independent avionics intensive flight test programs. +This facility is already being utilized to its maximum capacity. +Additional programs scheduled for flight test at Edwards which +have extensive avionics will include the F-15 Radar, the HH-60D, +and the EX program. + The existing facility was planned with sufficient space in +the time shared computer complex to house additional shared +computer capability. Thus the new facility would only require +space for test bays. + +IMPACT IF NOT PROVIDED: Future avionics flight test programs +would not be adequately supported, resulting in costly program +delays, inefficient use of expensive flying time, and the need +for Air Force funding of contractor off-base facilities which are +tailored to contractor development rather than combined airforce- +contractor flight test objectives. + +ADDITIONAL: The test mode required in the absence of an avionics +test facility includes development and integration at contractor +facilities, limited flight test support atthe test sites,remote +flight test support from contractor facilities, and airborne +trouble shooting (fly-fix-fly) which provides a fragmented and +inadequate Air Force evaluation of the avionics. + +The increasing complexity of the avionics in our current and +future aerospace vehicles has outdated the traditional test sup +port techniques. Avionic capabilities continue to expand and +take on new roles. Digital integration of fire and flight con +trol systems is under development. Voice operated fire and +flight control is being evaluated. Modern aircraft contain large +numbers of independent computers, sensors, displays, and controls +linked into a mutually dependent system. The quantity, complex +ity, and pervasiveness of avionics is increasing at an exponen +tial rate. Test and evaluation of the complex performance char +acteristics of the avionics requires the collection of quantities +of data involving numerous parameters too extensive for practical +manual analysis and too diverse to be economically solved with +"fly-fix-fly". In addition, limited time in service and high +failure rate of development hardware contribute to the need for +increased ground and airborne testing. In view of these added +requirements, cost and schedule constraints dictate the need for +additional ground T&E and simulation to insure effective use of +expensive flight testing. This facility and project will support +future programs such as the new F-15 Radar, the HH-60D Heli +copter, the JVX tilt wing program, the Advanced Technology +Bomber, the Advanced Technology Fighter, the New Fighter Air +craft, the EX (EC-135 replacement), and the Integrated Inertial +Reference Assembly. + \ No newline at end of file diff --git a/2006/toledo2/MASTER/FORMAT.COM b/2006/toledo2/MASTER/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/MASTER/FORMAT.COM differ diff --git a/2006/toledo2/MASTER/IMAGE b/2006/toledo2/MASTER/IMAGE new file mode 100644 index 000000000..fbd2d635c Binary files /dev/null and b/2006/toledo2/MASTER/IMAGE differ diff --git a/2006/toledo2/MASTER/INITDISK.COM b/2006/toledo2/MASTER/INITDISK.COM new file mode 100644 index 000000000..3de50e7b2 Binary files /dev/null and b/2006/toledo2/MASTER/INITDISK.COM differ diff --git a/2006/toledo2/MASTER/MAGE.COM b/2006/toledo2/MASTER/MAGE.COM new file mode 100644 index 000000000..c8cb6a381 Binary files /dev/null and b/2006/toledo2/MASTER/MAGE.COM differ diff --git a/2006/toledo2/MASTER/MAGE.DOC b/2006/toledo2/MASTER/MAGE.DOC new file mode 100644 index 000000000..d2506c591 --- /dev/null +++ b/2006/toledo2/MASTER/MAGE.DOC @@ -0,0 +1,47 @@ + + + MAGE.COM is an 8080 assembly language program +which retrieves files accidentally lost while using +WORDSTAR. The program captures an image of your +file from computer memory and saves it on a floppy +disk. + + MAGE can help with problems such as accidental +resets, resets caused by static discharge, power +fluctuations, bad sectors on floppy disks, write- +protected disks, full disks, BDOS errors on disks +and various WORDSTAR glitches. The program will +not recover a file after a complete power outage +nor under circumstances where you cannot reset the +computer. It can recover only that portion of a +file which is in computer memory at the time of the +accident. + + The first step in running this program is to +hit the reset button on the front panel. Contrary +to the Osborne 01 User's Reference Guide, this does +not initialize computer memory. The file from +WORDSTAR will remain intact in memory. + + Next, insert the floppy containing MAGE.COM +into one of the disk drives. Boot the system. + + Running the program is as simple as typing +"MAGE filenam", where "filenam" is the name you +want your file to be saved under. If you do not +specify a name, your file will be saved under the +default name " . ". + + When you execute MAGE your file will begin +listing to the screen almost immediately. The +program will stop automatically shortly after the +last of the recoverable textual material has been +reached. A small amount of empty memory will also +be copied at the bottom of your file. Use WORDSTAR +to remove these "nulls". + + As an alternative, MAGE constantly checks for +keyboard input. By depressing any key you may halt +program execution. Only the portion of memory al- +ready listed to the screen will be saved to disk. + \ No newline at end of file diff --git a/2006/toledo2/MASTER/MBASIC.COM b/2006/toledo2/MASTER/MBASIC.COM new file mode 100644 index 000000000..0d981bc01 Binary files /dev/null and b/2006/toledo2/MASTER/MBASIC.COM differ diff --git a/2006/toledo2/MASTER/MDM712.COM b/2006/toledo2/MASTER/MDM712.COM new file mode 100644 index 000000000..2252f9e2f Binary files /dev/null and b/2006/toledo2/MASTER/MDM712.COM differ diff --git a/2006/toledo2/MASTER/MDM712.DOC b/2006/toledo2/MASTER/MDM712.DOC new file mode 100644 index 000000000..43e18209a --- /dev/null +++ b/2006/toledo2/MASTER/MDM712.DOC @@ -0,0 +1,836 @@ + + MDM712 + + (NOTES ON HOW TO USE) + + Copyright 1983 + + by + + Irvin M. Hoff W6FFC + + 27 July 1983 + + +NOTE: MDM712 SUPPORTS AUTO-DIALING AND AUTOMATIC CONTINUOUS REDIALING + FOR THE FOLLOWING MODEMS: + + PMMI 103 S-100 PLUG-IN MODEM + HAYES SMARTMODEM 300 OR 1200 MODEMS + U. S. ROBOTICS 300/1200 MODEM + + (IT CAN STILL BE EASILY USED WITH OTHER EXTERNAL MODEMS + WITH MANUAL DIALING SUCH AS THE BELL 212A, RACAL-VADIC, ETC.) + IT SUPPORTS UP TO TWO LONG-DISTANCE DIALING SYSTEMS (SUCH AS + 'MCI', 'SPRINT', 'TYMNET', ETC. FOR TOUCH-TONE DIALING SYSTEMS. + +INTRODUCTION: +------------ + + MDM712 enables a computer to communicate with another computer. +This is normally done by using standard telephone lines but with special +audio tones sending serial data. Two common speeds are used, depending +on the facilities available -- 300 Baud or 1200 Baud. A "modem" is used +which provides these audio tones. This is an acronym for "modulator and +demodulator". The one section (modulator) provides the audio tones for +sending over the telephone line and the other section (demodulator) then +converts those audio tones back to digital pulses the computer uses to +receive the incoming data. + + The modem itself is a hardware utility, usually costing around $100 +to $250 for a typical 300 Baud device and from $400 to $800 for a system +offering 1200 Baud as well as 300 Baud. Some of these (such as the PMMI +S-100 modem board) plug directly into the computer itself, while others +are totally independent of the computer and use an interconnect cable +(usually a RS-232 type) to control the external modem. A Bell 212A is +an excellent example of this type modem. Other examples would include +the Racal-Vadic, Hayes Smartmodem, U. S. Robotics, Prentis, etc. + + The program discussed in this guide allows each computer involved +to directly control its own modem, converting DC pulses into audio tones +which are sent to (or received from) the telephone line. (The standard +1200 baud transmissions use "DFSK" (phase shift keying) instead of "AFSK" +(audio frequency shift keying). + + For short distances, no modems are required as the computer can +provide the necessary digital voltages. This discussion is centered +around systems intended for use over distances ranging from several +miles to literally around the world. + + + +FEATURES: +-------- + + A program to communicate with another computer can range from very +simple to very complex. MDM71 is one of the more complex such programs +available today. It started in 1977 as a relatively simple program. It +was called MODEM2 at that time. It was intended to be used primarily as +a means of exchanging programs with other people in other cities. Since +that time a number of other (very useful) features have been added, in +addition to improved methods of program transfer. A list of some of the +features offered by this particular program include: + + 1) Ability to talk with another computer via keyboard at each end. + (Called the "terminal mode".) + 2) Ability to operate a remote mainframe computer such as TYM-SHAR, + or special data bank systems now commonplace. This includes + "bulletin board" systems for receiving, sending or just read- + ing messges or other types of information. + 3) Ability to upload (send) or download (receive) programs from other + computers whether TYM-SHAR, data banks, remote hobby systems + or just another individual in another location. + 4) Ability to copy incoming information on a printer. If the print- + er is too slow to copy the data directly, the extra characters + back into a large storage buffer until they can be printed. + 5) Ability to copy incoming data into memory for automatic transfer + to a disk file. + 6) Accomodates any computer clock speed up to 25.5 MHz. in 0.1 Mhz. + increments for uniform results. (The clock speed is actually + of modest interest, it is only used for setting timing loops.) + 7) Advanced type of error detection (CRC or Cyclic Redundancy Check) + using automatically generated high-speed lookup tables. + 8) Automatic disconnect from the telephone line when using "BYE", "X" + or CTL-D. Two other disconnect commands with the PMMI modem. + 9) This particular program has additional features of special inter- + est to those using the PMMI 103 S-100 plug-in modem, the U. S. + Robotics 300/1200, or the Hayes Smartmodem 300 or 1200. Those + features basically include automatic dialing and redialing (if + requested) until the other computer finally answers. + + a) Automatic selection of a particular phone number from + a library of names and numbers. + b) Automatic dialing for alternate long-distance systems + (where auto-dialing touch-tone modems are used). + c) Entry of a hand-typed number. Although it might be as + simple to manually dial the number as hand-type it, it + can then be automatically redialed indefinitely. + + +USING THE PROGRAM THE FIRST TIME: +-------------------------------- + + For now, we shall assume the program is ready to use on your equip- +ment. (Normally the user must make some modest changes to the program +before it can be used. This includes changing the port numbers and some +other personal options. These will be covered later in the section that +describes how to adapt it to your equipment.) + + When the program is brought up is shows this display (if using the +PMMI modem): + + + MDM712 - (type M for Menu) + Version for PMMI S-100 modem starting at port: C0H + + B>>COMMAND: x + + + The cursor stops at point "x:" waiting for some sort of command. +Typing a "M" followed immediately by a RETURN, shows the first page of +a 4-page help guide. If you do not have a PMMI modem, you would have +seen this (or a customized heading for your particular equipment): + + MDM712 - (type M for Menu) + Version for Non-Pmmi modem + + B>> COMMAND: + + + In this case only a 3-page help guide is used, since the 4th page +is used to assist those with the PMMI modem. It tells them a little +about changing from originate to answer mode, how to change Baud rates, +how to disconnect, etc. + + Several commands are similar to those already used for CP/M, such +as 'ERA', 'DIR' and the ability to change disk drives and user areas. +This adds tremendous flexibility while remaining in the modem command +mode. To change disk drives, just say: + + B>>COMMAND: A: + + and you are in the same user area on the A: drive. You can also +say: + A>>COMMAND: A: 12 + + to change user areas. When finished (using this example), say: + + A12>>COMMAND: CPM + + and you will go back to CP/M with the original driver and user area. + +OPTIONS: +------- + + There are 6 primary options and 13 secondary options that may be +typed on the command line. In additon there are over 35 commands ranging +from single character to three characters that can be used (such as DIR, +ERA, LOG, etc.) Those are listed on the menu. (The exact number varies +depending on whether you have the PMMI modem, etc.) + + + Primary Options: E, L, M, R, S, T + E = Echo mode (special type of full duplex) + L = Local modem (no remote echo, half duplex) + M = Menu display showing features that are available + R = Receive a file from remote facility + S = Send a file to a remote facility + T = Terminal mode (full duplex, echo provived remotely) + + Secondary Options: A, B, D, L, O, Q, R, S, T, V, X, 0, 1 + A = Answer mode (used only by PMMI modems) + B = Batch mode -- allows automatic multiple file transfer + (This is normally only used from modem-to-modem as + no RCP/M system supports batch mode file transfers.) + D = Disconnect when done, stay in MDM712 + L = Local mode when finished with a file transfer + O = Originate mode (used only by PMMI modems) + Q = Quiet mode, special purpose feature rarely used except if + operating through a "BYE" program. + R = Receive data shown on CRT during file transfer + S = Send data shown on CRT during file transfer + T = Terminal mode when finished with a file transfer + V = Visual inspection of an ASCII file being transferred. Not + often used as most ASCII files are now "squeezed" for + minimum transfer time and disk space. + X = Exit to CP/M when finished, disconnect from phone line + 0 = Odd parity (PMMI modem) + 1 = Even parity (PMMI modem) + + + Although you can get the following information from the help guide +in MDM712, showing it here will allow us to discuss the various features +in somewhat better detail. + + +NOTE: THIS PROGRAM HAS SUPPORTED THE PMMI 103 S-100 PLUG-IN MODEM SINCE + ITS INCEPTION. IT NOW SUPPORTS THE HAYES SMARTMODEM 300 AND 1200 + AND THE US ROBOTICS 300/1200 MODEM AS WELL. IN THE FOLLOWING + COMMENTS AN ASTERISK (*) BEHIND THE WORD PMMI MEANS ALL THE COM- + MENT IS PERTINENT TO ALL THESE MODEMS. OTHERWISE IT WOULD BE A + LITTLE AWKWARD TO ATTEMPT TO MENTION THEM ALL EACH TIME. + + (*) THUS INDICATES PMMI, HAYES SMARTMODEM OR US ROBOTICS ALL APPLY. + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 1: +---------------------- + + Single Letter Commands + +? - Display current settings +M - Display the menu +E - Terminal mode with echo +L - Terminal mode with local echo +T - Terminal mode + For copying text to disk use T (or E or L) FILENAME.TYP + Start or Stop toggles described on subsequent screen. +R - Receive CP/M file using Christensen Protocol +S - Send CP/M file using Christensen Protocol + COMMAND: R (or S) FILENAME.TYP + R and S can use the following subcommands: + B - Bulk transfer using wildcards (e.g., *.*) + D - Disconnect when done + Q - Quiet mode (no messages to console) + T - Return to terminal mode after transfer + V - View bytes transferred on console + X - When done, disconnect, go to CP/M + + The single letter commands may also be used on the + command line when the program is initially executed. + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE PAGE 1: +------------------------------- + + There are basically three types of commands that may be used with +this program: + 1) Single-letter commands shown on page one. + 2) Three-letter commands shown on page 2, and + 3) Control- commands shown on page 3. + + Going down the list: + + ? - shows current parameters. As these are closely tied in with some + of the other options, we shall show a typical example later + in this discussion. + M - shows the menu a page at a time. You may abort after any page is + shown with a control-C. + E - terminal mode with echo. When talking with another terminal also + also using MDM712 (or a comparable program), one of you must + send an "echo-back" so you can both see what the other person + is typing. This is needed for full-duplex operation. Usually + the person originating the call will type "E" instead of "T". + However either may do this. If "both" use the echo mode, the + program usually starts typing a string of feedback characters + since both computers are re-sending the same character over + and over. You can stop this by just returning to command mode + (type control-E) and then retyping "T" rather than "E". + L - terminal mode with local echo. Shows what you are typing but does + not send an echo of the other person's typing back to him. + Can be used at both ends, in place of one person using "E". + Both "E" and "L" are useful at times for some types of modems + that do not use full-duplex, or for some main frame units that + run half-duplex. The combination of "T", "E" and "L" gives an + excellent choice to use on various systems. Normally the "T" + mode is sufficient except when talking with another person and + then the "E" mode at one end or "L" mode at both ends will + provide normal results. + T - if typed as the first (primary) option, puts the program directly + into "terminal mode", allowing it to send from the keyboard to + the other computer, and to copy anything coming from the other + computer with the exception of file transfers (use "R" to re- + ceive those). + R - used only for receiving files from the other computer. These are + usually sent in binary form with either checksum verification + or more commonly, CRC (Cyclic Redundancy Checking). If ready + to receive another file, you have several choices, depending + on the program used by the other computer. After notifying + him you are ready (or will be very shortly), you can tr 4 €windows which scroll together.#This command is used to hold column#€titles or row headings in place$while cells are scrolled. Parameters$€are:€%1. Number of rows to become a window%„across the top of the screen.!2. Number of columns to become a!!„window at the left of the screen.!€'The remaining display space becomes the'!€active window which is linked for!#nal window for&€synchronized scrolling€in the vertical direction.€€WINDOW SPLIT TITLES€ Splits active window into 2 o automatically + places you in a "ready to go again" situation when the trans- + fer is finished. + + Another "R" option would be: + + B>>COMMAND: RB + + This is called the "Batch mode" and is an extremely useful way + to receive programs automatically, from another computer using + a similar program. He will use the batch mode for sending the + programs and that automatically provides the file names at the + receiving end. In this manner, large numbers of programs can + be transferred completely automatically, including full disks. + (Assuming you care to pay the toll calls for the time it will + take!) + + NOTE: The ideal way to receive batch mode would be: + + B>>COMMAND: RBT + + since you may not know in advance how many programs he + will be sending. When the transfer is complete, you + are automatically in the "T" mode and he can start + typing to you, immediately, with any comments relative + to the progress of the transfer, etc. (He would use + the "E" mode.) + + S - Send programs. Similar to "R" but sends instead of receives. If + the other system is ready to receive, you can type: + + B>>COMMAND: S HELLO.DOC + + It will tell you how many records are involved and how many + minutes and seconds it will take to send the program. If the + other system is ready to receive, it starts the transfer, + showing how many records have been sent. If any errors occur + during transmission, it shows what they are and counts them. + It will resend any records not correctly received at the other + computer. If too many consecutive errors occur (normally set + at 10), the transfer is terminated. The batch mode may also + be used for sending: + + B>>COMMAND: SB HELLO.* + + will send all files starting with HELLO, or can send just one + file, or can send several non-related files in this manner: + + B>>COMMAND: SB HELLO.DOC XDIR.COM TERM.* + + etc. Be sure to put a space between the various files. You + can include the 'X' option: + + B>>COMMAND: SBX HELLO.* MDM712.LBR MDM712.AQM + + When the file transfer is completed it disconnects from the + phone line and reverts to CP/M. This allows you to be absent + when the file is finished, offering an advantage when sending + lengthy files. + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 2: +---------------------- + + Three Letter Commands + +CPM - Exit from this program to CP/M +DIR - List directory and space free (may specify drive) +ERA - Erase file (may specify drive) +LOG - Change default drive/user no. (specify drive/user) + and reset disks. e.g. LOG A0: or LOG B: (user # unchanged) +SPD - Set speed of file output in terminal mode +TIM - Select Baud rate for "time-to-send" message +TCC - Toggle CRC/Checksum mode on receive +TBR - Toggle backspace to rubout conversion +TLC - Toggle 1) local command immediate + 2) local command after CTL-^ +TLF - Toggle LF after CR when sending disk file in "T" mode +TXO - Toggle XOFF testing in terminal mode file output +NUM - List remote systems +SET - Set modem baud rate +BYE - Disconnect, then return to CP/M +CAL - Dial number +DSC - Disconnect from the phone line + + The following are terminal text buffer commands: + +DEL - Delete memory buffer and file +WRT - Write memory buffer to disk file + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, PAGE 2: +-------------------------------- + + CPM - This returns to normal CP/M use, abandoning MDM712. + CAUTION: It does not disconnect the modem from the phone line. + DIR - Enables the user to see the library of any disk without needing + to return to CP/M first. Can be adjusted when installing the + program to show 3, 4, or 5 groups depending on the width of + your CRT display. Normally set to 5 for 80-column displays. + Shows the amount of disk spacing remaining on the logged-in + default drive. (You must log in any drive you wish to write + on, or to see the correct free disk space remaining.) See the + LOG feature below. + ERA - Enables the user to erase any files from any disk without the + need to return to CP/M first. Wild cards (* and ?) accepted. + LOG - When a new disk is inserted, you can see the directory and read + files from it but cannot write to it without getting a "BDOS + ERR". This command allows you to log in a new disk so you can + immediately write on it without first returning to CP/M for a + warm boot. You can select drive and user number. (This also + enables DIR to show the correct free disk space remaining.) + You can say: + LOG for same drive, user area, new disk + LOG A + LOG A: + LOG A14 (user areas are 0-15) + LOG A11: + + SPD - Sets the delay between characters and/or delay between lines in + the "T" mode when using control-T to upload a pre-typed file. + Since most bulletin boards and TYM-SHAR systems normally use + line editors that require a delay after they have received a + line, you can add delay between characters (in increments of + 10 ms.) and/or enter delay between lines (in increments of 100 + ms.). This is preset for most systems at 50 and 500 ms. They + can be changed at any time. Current values can be checked by + using the " ? " command. + TIM - This option lets you set the file transfer time from 110 Baud to + 9600 Baud. You can preset it (when installing the program) to + the value normally used, but at times it is nice to be able to + conveniently change the time shown to a different rate. Some + initialization routines (discussed in the install section) can + make this change automatically. This command does not show if + using the PMMI* board as the speed is automatically changed to + agree with the current Baud rate selection. It also does not + show if the custom overlay uses the SET command to choose var- + ious Baud rates as the transfer time is changed automatically. + TCC - Most modem programs originally used simple checksum verification + of received sectors. Most now use Cyclic Redundancy Checking + which finds certain transmission errors the simple checksum + system might overlook. This toggle allows the user to select + checksum for those systems known to not offer CRC. When set + normally to CRC, the program automatically switches to check- + sum after trying several times to use CRC. + TBR - Some systems use the "rubout" key for backspace. This toggle + allows you to readily adapt to those systems. Rarely used. + TLC - Nearly all computers use "control-characters" to do various + tasks such as move the cursor around, clear the screen, reboot + the system, etc. You might want to send a control-E character + to the local computer and not have it go to the remote system + at the same time. Say a moment later you would like to send a + control-E only to the remote computer. You would do this: + + control-E (goes to local computer only) + control-^ control-E (goes to the remote computer only) + + You can reverse the TLC toggle causing this response: + + control-E (goes to remote computer only) + control-^ control-E (goes to the local computer only) + + All other control-chars. would operate in a similar manner. + This gives extra flexibility in using this program for special + systems like TYM-SHAR, etc. + + NOTE: If using control-^ is awkward, you can pick a different + character when installing the program initially. + + TLF - If sending a file while in terminal mode (via CTL-T option) most + mainframe computers will not want you to send a line feed. As + all editors include the LF after CR, you have the option with + this toggle of sending or not sending a line feed. If typing + manually in the "T" mode, you can get a line feed with CTL-J. + It is automatically included after CR with "L" or "E" modes. + TXO - Used when uploading pre-typed text files to other systems such + as TYM-SHAR or bulletin boards, etc. Most of those have line + editors that take a moment to move the line you just finished + from their edit buffer into memory. The XOFF character halts + your system from sending until it is ready for a new line. + Used only in the terminal mode. + NUM - Not shown if using PMMI*. This shows the non-PMMI* people the + phone library numbers which can be used for manual dialing. + SET - Not shown if using PMMI, or if SETUPR is set to "NO" (indicating + no user routine in the overlay for choosing different speeds.) + BYE - Disconnects the modem from the phone line, closes any file that + may be open and returns to CP/M. + CAL - PMMI* command, shows the phone library for auto-dialing. If not + using a PMMI*, this will not be shown, instead NUM is shown. + It displays the telephone library. (Non-PMMI users will find + the NUM display beneficial as it can display useful phone num- + bers for manual dialing.) + + NOTE: Use the phone number overlay to easily change the numbers + that are stored. This overlay also accesses up to two + alternate long distance dialing systems for the touch- + tone auto-dialing modems. + + DSC - Disconnects the modem from the phone line whenever selected. + DEL - If copying incoming information into memory, and you decide you + do not want to bother saving it to disk after all, this closes + (and then deletes) the disk file you had opened. + WRT - saves what you have been copying to the disk file already opened + for that purpose. When returning from the "T" mode to command + mode, a warning is shown that you may lose what has been saved + unless you use WRT (write to disk). + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 3: +---------------------- + + Local Commands while in Terminal Mode + + CTL-@ - Send a break tone for 300 ms. + CTL-B - Change Baud rate + CTL-E - Exit to command mode + CTL-L - Send log-on message + CTL-N - Disconnect from the phone line + CTL-P - Toggle printer + CTL-Y - Start copy into buffer + CTL-R - Stop copy into buffer + + Start & Stop may be toggled as often as desired. + A ":" at start of line indicates buffer is copying. + XOFF automatically used to stop input when writing + full buffer to disk, XON sent to resume. + + CTL-T - Transfer ASCII file to remote + + CTL-^ - Send local control character to remote + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, PAGE 3: +-------------------------------- + + CTL-@ - Sends a break character to the other computer. Used in some + TYM-SHAR systems, etc. (Used only in PMMI mode) + CTL-B - PMMI command, changes the Baud rate from 110-710, in addition + changes the file transfer time accordingly. + CTL-E - Returns to command modem from "T", "L", "E" modes. + CTL-L - Will send the log-on message if TRANLOGON is set YES and a + message has been included in the LOGON area. Can use this + feature to sign on various bulletin board systems, although + that would require an identical password on each. + CTL-N - Disconnect the modem from the phone line. (CTL-D had been + used for this command, but it was too easy to accidently + type CTL-D when expecting to hit CTL-S or CTL-E or CTL-X. + You can easily change this to whatever you like in the + overlay you use for your equipment.) + CTL-P - Toggles the printer on-off. Very useful feature. Similar to + normal control-P but in this case if the modem is running + faster than normal printer speed, the characters just back + into a special buffer while the printer tries to catch up. + Most dot matrix printers are considerably faster than most + telephone modems, however. Can be toggled at any time you + are in the "T", "L" or "E" modes. Often used to copy items + from bulletin boards, etc. that are not worth permanently + saving on disk. + CTL-Y - Used only in terminal mode. If a file was opened prior to + going to "T" (terminal) mode, nothing will be saved until + control-Y is typed. This places a ";" (semicolon) at the + start of each new line, indicating the memory is "hot" and + is now copying for saving to a file. You can toggle this + off by using control-R. + + NOTE: To open a file use: COMMAND: T FILENAME.EXT and + then CTL-Y and CTL-R will control what is copied to + be placed in that file. + + CTL-R - Stops the copy into memory, shuts off the ";" at start of + each line. These two commands (CTL-Y to start, and CTL-R + to stop) control what is being saved. When returning to + command (via CTL-E), you will then be warned to save the + information to disk via the WRT command or it will likely + be lost. (You may never use CTL-R although CTL-Y is re- + quired to commence saving to memory for the disk file you + previously opened.) + + (These commands -- CTL-P, CTL-Y and CTL-R give + MDM712 tremendous versatility. You can copy + incoming data either to disk or to printer (or + both). My own printer is a 300 Baud Teletype + Corporation Model 43, yet it works great when I + am using the Bell 212A at 1200 Baud. The printer + falls behind, but misses nothing as it eventually + catches up with the contents of the large buffer.) + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, SPECIAL PMMI PAGE: +--------------------------------- + + Additional Subcommands for PMMI Modems + +Modem control: + A - Answer tone for send or receive + O - Originate tone for send or receive + +Parity options: + 1 - Set and check for odd parity + 0 - Set and check for even parity + Both ends must be capable of these options + which are available only in R and S modes. + The parity checking will be part of the + file transfer protocol. + +Speed Options: + After entering your primary and secondary options, + you can set the modem speed by placing a "." after + the options followed by the speed e.g., 300, 1200. + + EXAMPLE: SBOT.600 will set the modem for 600 baud + + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, SPECIAL PMMI PAGE: +------------------------------------------- + + When using MDM712 with the PMMI board, you will either dial out or +(far less likely) answer some incoming call. Since the unit will be in +"originate mode" about 98% of the time, it is set to automatically come +up in the originate mode at default speed (300 Baud) whenever a call has +been completed. If you want to use answer mode, you need to use the "A" +command. If a speed is not included, it will stay at the default speed. + + Until a connection has been made, there are no tones applied to the +line. Originate tones at 300 Baud are automatically added at that time. + + In addition to telling the PMMI modem if it should use originate or +answer tones, you can tell it what Baud rate to use. A typical command +(once connection is made to another modem) would be: + + B>>COMMAND: TO.600 + + This puts the tones on the phone line for originate and at the +same time sets the PMMI board for 600 Baud. Another typical response +might be: + + B>>COMMAND: RABT.450 + + This places the answer tones on the phone line, sets the program +for receiving batch mode at 450 Baud and returns to terminal mode when +the transfer is completed. + + Other optional PMMI commands seem self-explanatory, such as dis- +connect, etc. + +- - - - - - - - - - - - - - - - - - + + +PMMI, HAYES AND ROBOTICS AUTO-DIALING AND AUTO-REDIALING: +-------------------------------------------------------- + + There are several very useful and versatile features offered for +the PMMI, Hayes Smartmodem and Robotics users. These include alternate +long distance dialing systems. + + There are several ways to auto-dial. + + 1) from the command line + 2) from the phone number library line + + In addition you can auto-redial from either of these lines. Once +the number has auto-dialed and there is no answer, it will ask you if +you want it to continuously auto-redial until it does receive an answer +(or you decide to abort). + + To get the phone library, type CAL on the command line. You +then normally just type the alphabetic character at the start of the ap- +propriate line. It will show the number being dialed. You can also do +this from the main command line if you know in advance what alphabetic +character is associated with that particular number: + + B>>COMMAND: CAL P + + This calls up the "P" line in the library and dials that number, +then if busy asks if you want it to continue redialing. You can use: + + B>>COMMAND: CAL 313-749-6569 + + and it will dial the number specified. You can then do either of +these on the library command line, as well. This gives a tremendous +versatility. + +NOTE: To access the alternate long distance dialing systems (up to two + are offered), use the phone number overlay and fill in the infor- + mation regarding your access number, billing number, etc. It + will then show how to enter a special character ahead of each + phone number where alternate long distance system is desired. + This only works where touch-tone systems are in use. + +- - - - - - - - - - - - - - - - - - + + +CASCADING COMMANDS: +------------------ + + Several commands may be used on the same line. Ones normally used +are: A, B, D, E, L, O, Q, R, S, T, V, X (and Baud rate if PMMI). + + A typical PMMI selection might be: RABQ.300 + + The commands have been listed previously but will be listed here +again: + + A) answer tones for PMMI S-100 modem, puts tones online. + B) batch mode (must be used at both ends if used at all) + (usually only available modem-to-modem with operators + present at each end.) + E) echo mode for conversing with a system not offering echo. + L) local echo shows what you are sending if no remote echo. + O) originate tones for PMMI S-100 modem, puts tones online. + Q) quiet mode, suppresses messages on local console. + R) receive file transfers with CRC or checksum protocol. + S) send file transfers, also shows transfer time. + T) terminal mode - operates computer at other end like a remote + terminal. Also stands for "text mode". When in "T" mode + you can copy incoming to printer or to disk, and send pre- + typed ASCII text files via CTL-T. + V) visual -- lets you see incoming ASCII files while being sent + to the disk system. + + NOTE: The Baud rate is only used for the PMMI S-100 modem. + Many of the custom overlays allow use of the SET + command to change Baud rate with non-PMMI modems. + +- - - - - - - - - - - - - - - - - - + + +TYPICAL PARAMETERS SHOWN BY THE "?" COMMAND: +------------------------------------------- + + B> COMMAND (H for Help): ? + +Mode: CRC +Printer is OFF +Backspace is backspace +Modem speed is 300 baud +Termianl mode file buffer is inactive +Unused portion of buffer is 16384 bytes +Use CTL-^ to send local command to remote +Linefeed NOT sent after CR for disk file in T-mode +XOFF testing NOT used in terminal mode file output +XON NOT automatically tested after CR in terminal mode file output + +Char. delay (terminal file mode) is: 50 ms. per character +Line delay (terminal file mode) is: 500 ms. per character + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF TYPICAL PARMETERS SHOWN BY THE "?" COMMAND: +-------------------------------------------------------- + + By this time, most of these parameters are self-explanatory. They +primarily show how the options and toggles have been set. The user can +check on any of the major parameters at any time by: + + 1) Typing control-E to return to command mode and + 2) Typing ? to see the list of current parameters. + +- - - - - - - - - - - - - - - - - - + + +INSTALLING THE PROGRAM: +---------------------- + + Although this is obviously the very first thing that needs to be +done, it was saved until last for several reasons. The most important +of these was the need to first explain what some of the options will do +when selected. + + By this time the user should have a fairly good idea what options +would work best for him. When looking at the beginning of the program +where the these are selected, it should now be rather easy to pick the +ones that are most useful. + + There are various ways to change the program to suit a specific +user. These are discussed to a modest extent in the information file +called MDM712.INF. You are offered several methods. The "easy way" is +to get MDM712.COM plus the appropriate overlay for your computer. You +then edit the overlay (if needed) to suit your local needs, assemble it +to get a .HEX file then use the simple instruction and DDT.COM to com- +bine the standard MDM712.COM file with your overlay. The front end of +each overlay contains all the information in the front of the MDM712 +source code itself. + + Generally no changes need to be made in specific overlays unless +you have some particular requirement different from others using the +same equipment. (Such as the log-on message, for example.) + + The "hard way" would be to get the MDM712.ASM source code (which +is around 112k and would take well over an hour to download at 300 Baud) +and then edit it to suit. This is likely to be quite unsatisfactory for +most users as it will not contain the information peculiar to your com- +puter (which is in the individual overlay you select otherwise.) + + Thus various methods are available, one of which should provide the +easiest method for your system. + +NOTE: Although designed with special emphasis on the auto-dialing and + redialing capability of the PMMI, Hayes Smartmodem or Robotics, + it works quite well on non-PMMI modems. In the author's system + a stock Bell 212A Dataphone is used together with a normal ser- + ial I/O that can be programmed to easily switch from 300 to 1200 + Baud. The system includes a Teletype Corp. Model 43 dot matrix + 300 Baud printer. A great variety of other computers and modems + can use this same program quite easily. This is likely the most + versatile phone modem program currently available for CP/M users. + +OUR THANKS TO: +------------- + + A great number of people have contributed to the growth of this +program since 1977. Two people have been particularly helpful to me in +developing the MDM700 series modem programs: Keith Petersen (W8SDZ) +and Frank Gaude' (ex-K6IBE). Their help and interest have been greatly +appreciated. + + We hope this verstile program will give you hours of enjoyment and +fulfill your modem needs. It has long been a goal of mine to provide +the same program for the people using the Hayes Smartmodem (or Robotics) +as for those using the PMMI 103 modem. + + + - Irv Hoff W6FFC + \ No newline at end of file diff --git a/2006/toledo2/MASTER/MDM712KP.COM b/2006/toledo2/MASTER/MDM712KP.COM new file mode 100644 index 000000000..b19f5f733 Binary files /dev/null and b/2006/toledo2/MASTER/MDM712KP.COM differ diff --git a/2006/toledo2/MASTER/PIP.COM b/2006/toledo2/MASTER/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/MASTER/PIP.COM differ diff --git a/2006/toledo2/MASTER/SETDISK.COM b/2006/toledo2/MASTER/SETDISK.COM new file mode 100644 index 000000000..ad8d4db21 Binary files /dev/null and b/2006/toledo2/MASTER/SETDISK.COM differ diff --git a/2006/toledo2/MASTER/SYSGEN.COM b/2006/toledo2/MASTER/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/MASTER/SYSGEN.COM differ diff --git a/2006/toledo2/MASTER/WASH.COM b/2006/toledo2/MASTER/WASH.COM new file mode 100644 index 000000000..fa6ee3176 Binary files /dev/null and b/2006/toledo2/MASTER/WASH.COM differ diff --git a/2006/toledo2/MASTER/XDIR.COM b/2006/toledo2/MASTER/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/MASTER/XDIR.COM differ diff --git a/2006/toledo2/MFDISK/MFDISK.INF b/2006/toledo2/MFDISK/MFDISK.INF new file mode 100644 index 000000000..ef6242213 --- /dev/null +++ b/2006/toledo2/MFDISK/MFDISK.INF @@ -0,0 +1,35 @@ +MFDISK.INF + + Multi-Disk Formatter for Kaypro's + ================================= +................................................................. + MFDISK2.COM MFDISK4.COM MFDISK10.COM +................................................................. + +Msg 01774 is 17 line(s) on 01/20/84 from STEVE RASMUSSEN +to ALL KAYPRO OWNERS re: FREE MULTI-FORMAT PROGRAM + +Hello !! I'm Steve Rasmussen, and I work at Kaypro Corporation. +The week of January 23rd I'll be releasing to production the +master disks for a new program called MFDISK. There are versions +that run on the Kaypro 2, Kaypro 4, and Kaypro 10. This program +allows your mighty Kaypro to read, write and format disks in +seventeen other computer formats. (thirteen formats for the +Kaypro 2, because double sided formats don't work real well in +that machine) These programs will ONLY run on Kaypro hardware. +Anyway, Kaypro Corp. has decided that rather than charge existing +Kaypro customers for these programs, they should be offered at no +charge, provided someone like KUG will handle the distribution +headaches. I'm happy to either modem them (xmodem or lync +protocol) or send them to whoever in KUG would like to take care +of this. (P.S. If there are any formats not included that you +would like to see, communicate them either in a letter to me on +this B.B.S., or tell your dealer.) + Steve Rasmussen + +------------------------------------------------------------------ +Any formats you would like to see added to these fine programs, +leave me a message and I will pass it on to Steve at Kaypro-NLS. + +Steve Sanders (Sysop) Tampa Bay Bandit Board RCP/M (813) 937-3608 + \ No newline at end of file diff --git a/2006/toledo2/MFDISK/MFDISK10.COM b/2006/toledo2/MFDISK/MFDISK10.COM new file mode 100644 index 000000000..6eb90946b Binary files /dev/null and b/2006/toledo2/MFDISK/MFDISK10.COM differ diff --git a/2006/toledo2/MFDISK/MFDISK2.COM b/2006/toledo2/MFDISK/MFDISK2.COM new file mode 100644 index 000000000..e80bd5581 Binary files /dev/null and b/2006/toledo2/MFDISK/MFDISK2.COM differ diff --git a/2006/toledo2/MFDISK/MFDISK4.COM b/2006/toledo2/MFDISK/MFDISK4.COM new file mode 100644 index 000000000..a3bba003e Binary files /dev/null and b/2006/toledo2/MFDISK/MFDISK4.COM differ diff --git a/2006/toledo2/MODEM7/CPMADR.COM b/2006/toledo2/MODEM7/CPMADR.COM new file mode 100644 index 000000000..5a4804cba Binary files /dev/null and b/2006/toledo2/MODEM7/CPMADR.COM differ diff --git a/2006/toledo2/MODEM7/DU2.COM b/2006/toledo2/MODEM7/DU2.COM new file mode 100644 index 000000000..907e02fbf Binary files /dev/null and b/2006/toledo2/MODEM7/DU2.COM differ diff --git a/2006/toledo2/MODEM7/FORMAT.COM b/2006/toledo2/MODEM7/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/MODEM7/FORMAT.COM differ diff --git a/2006/toledo2/MODEM7/INITDISK.COM b/2006/toledo2/MODEM7/INITDISK.COM new file mode 100644 index 000000000..3de50e7b2 Binary files /dev/null and b/2006/toledo2/MODEM7/INITDISK.COM differ diff --git a/2006/toledo2/MODEM7/MBASIC.COM b/2006/toledo2/MODEM7/MBASIC.COM new file mode 100644 index 000000000..0d981bc01 Binary files /dev/null and b/2006/toledo2/MODEM7/MBASIC.COM differ diff --git a/2006/toledo2/MODEM7/MDM712.COM b/2006/toledo2/MODEM7/MDM712.COM new file mode 100644 index 000000000..2252f9e2f Binary files /dev/null and b/2006/toledo2/MODEM7/MDM712.COM differ diff --git a/2006/toledo2/MODEM7/MDM712.DOC b/2006/toledo2/MODEM7/MDM712.DOC new file mode 100644 index 000000000..43e18209a --- /dev/null +++ b/2006/toledo2/MODEM7/MDM712.DOC @@ -0,0 +1,836 @@ + + MDM712 + + (NOTES ON HOW TO USE) + + Copyright 1983 + + by + + Irvin M. Hoff W6FFC + + 27 July 1983 + + +NOTE: MDM712 SUPPORTS AUTO-DIALING AND AUTOMATIC CONTINUOUS REDIALING + FOR THE FOLLOWING MODEMS: + + PMMI 103 S-100 PLUG-IN MODEM + HAYES SMARTMODEM 300 OR 1200 MODEMS + U. S. ROBOTICS 300/1200 MODEM + + (IT CAN STILL BE EASILY USED WITH OTHER EXTERNAL MODEMS + WITH MANUAL DIALING SUCH AS THE BELL 212A, RACAL-VADIC, ETC.) + IT SUPPORTS UP TO TWO LONG-DISTANCE DIALING SYSTEMS (SUCH AS + 'MCI', 'SPRINT', 'TYMNET', ETC. FOR TOUCH-TONE DIALING SYSTEMS. + +INTRODUCTION: +------------ + + MDM712 enables a computer to communicate with another computer. +This is normally done by using standard telephone lines but with special +audio tones sending serial data. Two common speeds are used, depending +on the facilities available -- 300 Baud or 1200 Baud. A "modem" is used +which provides these audio tones. This is an acronym for "modulator and +demodulator". The one section (modulator) provides the audio tones for +sending over the telephone line and the other section (demodulator) then +converts those audio tones back to digital pulses the computer uses to +receive the incoming data. + + The modem itself is a hardware utility, usually costing around $100 +to $250 for a typical 300 Baud device and from $400 to $800 for a system +offering 1200 Baud as well as 300 Baud. Some of these (such as the PMMI +S-100 modem board) plug directly into the computer itself, while others +are totally independent of the computer and use an interconnect cable +(usually a RS-232 type) to control the external modem. A Bell 212A is +an excellent example of this type modem. Other examples would include +the Racal-Vadic, Hayes Smartmodem, U. S. Robotics, Prentis, etc. + + The program discussed in this guide allows each computer involved +to directly control its own modem, converting DC pulses into audio tones +which are sent to (or received from) the telephone line. (The standard +1200 baud transmissions use "DFSK" (phase shift keying) instead of "AFSK" +(audio frequency shift keying). + + For short distances, no modems are required as the computer can +provide the necessary digital voltages. This discussion is centered +around systems intended for use over distances ranging from several +miles to literally around the world. + + + +FEATURES: +-------- + + A program to communicate with another computer can range from very +simple to very complex. MDM71 is one of the more complex such programs +available today. It started in 1977 as a relatively simple program. It +was called MODEM2 at that time. It was intended to be used primarily as +a means of exchanging programs with other people in other cities. Since +that time a number of other (very useful) features have been added, in +addition to improved methods of program transfer. A list of some of the +features offered by this particular program include: + + 1) Ability to talk with another computer via keyboard at each end. + (Called the "terminal mode".) + 2) Ability to operate a remote mainframe computer such as TYM-SHAR, + or special data bank systems now commonplace. This includes + "bulletin board" systems for receiving, sending or just read- + ing messges or other types of information. + 3) Ability to upload (send) or download (receive) programs from other + computers whether TYM-SHAR, data banks, remote hobby systems + or just another individual in another location. + 4) Ability to copy incoming information on a printer. If the print- + er is too slow to copy the data directly, the extra characters + back into a large storage buffer until they can be printed. + 5) Ability to copy incoming data into memory for automatic transfer + to a disk file. + 6) Accomodates any computer clock speed up to 25.5 MHz. in 0.1 Mhz. + increments for uniform results. (The clock speed is actually + of modest interest, it is only used for setting timing loops.) + 7) Advanced type of error detection (CRC or Cyclic Redundancy Check) + using automatically generated high-speed lookup tables. + 8) Automatic disconnect from the telephone line when using "BYE", "X" + or CTL-D. Two other disconnect commands with the PMMI modem. + 9) This particular program has additional features of special inter- + est to those using the PMMI 103 S-100 plug-in modem, the U. S. + Robotics 300/1200, or the Hayes Smartmodem 300 or 1200. Those + features basically include automatic dialing and redialing (if + requested) until the other computer finally answers. + + a) Automatic selection of a particular phone number from + a library of names and numbers. + b) Automatic dialing for alternate long-distance systems + (where auto-dialing touch-tone modems are used). + c) Entry of a hand-typed number. Although it might be as + simple to manually dial the number as hand-type it, it + can then be automatically redialed indefinitely. + + +USING THE PROGRAM THE FIRST TIME: +-------------------------------- + + For now, we shall assume the program is ready to use on your equip- +ment. (Normally the user must make some modest changes to the program +before it can be used. This includes changing the port numbers and some +other personal options. These will be covered later in the section that +describes how to adapt it to your equipment.) + + When the program is brought up is shows this display (if using the +PMMI modem): + + + MDM712 - (type M for Menu) + Version for PMMI S-100 modem starting at port: C0H + + B>>COMMAND: x + + + The cursor stops at point "x:" waiting for some sort of command. +Typing a "M" followed immediately by a RETURN, shows the first page of +a 4-page help guide. If you do not have a PMMI modem, you would have +seen this (or a customized heading for your particular equipment): + + MDM712 - (type M for Menu) + Version for Non-Pmmi modem + + B>> COMMAND: + + + In this case only a 3-page help guide is used, since the 4th page +is used to assist those with the PMMI modem. It tells them a little +about changing from originate to answer mode, how to change Baud rates, +how to disconnect, etc. + + Several commands are similar to those already used for CP/M, such +as 'ERA', 'DIR' and the ability to change disk drives and user areas. +This adds tremendous flexibility while remaining in the modem command +mode. To change disk drives, just say: + + B>>COMMAND: A: + + and you are in the same user area on the A: drive. You can also +say: + A>>COMMAND: A: 12 + + to change user areas. When finished (using this example), say: + + A12>>COMMAND: CPM + + and you will go back to CP/M with the original driver and user area. + +OPTIONS: +------- + + There are 6 primary options and 13 secondary options that may be +typed on the command line. In additon there are over 35 commands ranging +from single character to three characters that can be used (such as DIR, +ERA, LOG, etc.) Those are listed on the menu. (The exact number varies +depending on whether you have the PMMI modem, etc.) + + + Primary Options: E, L, M, R, S, T + E = Echo mode (special type of full duplex) + L = Local modem (no remote echo, half duplex) + M = Menu display showing features that are available + R = Receive a file from remote facility + S = Send a file to a remote facility + T = Terminal mode (full duplex, echo provived remotely) + + Secondary Options: A, B, D, L, O, Q, R, S, T, V, X, 0, 1 + A = Answer mode (used only by PMMI modems) + B = Batch mode -- allows automatic multiple file transfer + (This is normally only used from modem-to-modem as + no RCP/M system supports batch mode file transfers.) + D = Disconnect when done, stay in MDM712 + L = Local mode when finished with a file transfer + O = Originate mode (used only by PMMI modems) + Q = Quiet mode, special purpose feature rarely used except if + operating through a "BYE" program. + R = Receive data shown on CRT during file transfer + S = Send data shown on CRT during file transfer + T = Terminal mode when finished with a file transfer + V = Visual inspection of an ASCII file being transferred. Not + often used as most ASCII files are now "squeezed" for + minimum transfer time and disk space. + X = Exit to CP/M when finished, disconnect from phone line + 0 = Odd parity (PMMI modem) + 1 = Even parity (PMMI modem) + + + Although you can get the following information from the help guide +in MDM712, showing it here will allow us to discuss the various features +in somewhat better detail. + + +NOTE: THIS PROGRAM HAS SUPPORTED THE PMMI 103 S-100 PLUG-IN MODEM SINCE + ITS INCEPTION. IT NOW SUPPORTS THE HAYES SMARTMODEM 300 AND 1200 + AND THE US ROBOTICS 300/1200 MODEM AS WELL. IN THE FOLLOWING + COMMENTS AN ASTERISK (*) BEHIND THE WORD PMMI MEANS ALL THE COM- + MENT IS PERTINENT TO ALL THESE MODEMS. OTHERWISE IT WOULD BE A + LITTLE AWKWARD TO ATTEMPT TO MENTION THEM ALL EACH TIME. + + (*) THUS INDICATES PMMI, HAYES SMARTMODEM OR US ROBOTICS ALL APPLY. + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 1: +---------------------- + + Single Letter Commands + +? - Display current settings +M - Display the menu +E - Terminal mode with echo +L - Terminal mode with local echo +T - Terminal mode + For copying text to disk use T (or E or L) FILENAME.TYP + Start or Stop toggles described on subsequent screen. +R - Receive CP/M file using Christensen Protocol +S - Send CP/M file using Christensen Protocol + COMMAND: R (or S) FILENAME.TYP + R and S can use the following subcommands: + B - Bulk transfer using wildcards (e.g., *.*) + D - Disconnect when done + Q - Quiet mode (no messages to console) + T - Return to terminal mode after transfer + V - View bytes transferred on console + X - When done, disconnect, go to CP/M + + The single letter commands may also be used on the + command line when the program is initially executed. + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE PAGE 1: +------------------------------- + + There are basically three types of commands that may be used with +this program: + 1) Single-letter commands shown on page one. + 2) Three-letter commands shown on page 2, and + 3) Control- commands shown on page 3. + + Going down the list: + + ? - shows current parameters. As these are closely tied in with some + of the other options, we shall show a typical example later + in this discussion. + M - shows the menu a page at a time. You may abort after any page is + shown with a control-C. + E - terminal mode with echo. When talking with another terminal also + also using MDM712 (or a comparable program), one of you must + send an "echo-back" so you can both see what the other person + is typing. This is needed for full-duplex operation. Usually + the person originating the call will type "E" instead of "T". + However either may do this. If "both" use the echo mode, the + program usually starts typing a string of feedback characters + since both computers are re-sending the same character over + and over. You can stop this by just returning to command mode + (type control-E) and then retyping "T" rather than "E". + L - terminal mode with local echo. Shows what you are typing but does + not send an echo of the other person's typing back to him. + Can be used at both ends, in place of one person using "E". + Both "E" and "L" are useful at times for some types of modems + that do not use full-duplex, or for some main frame units that + run half-duplex. The combination of "T", "E" and "L" gives an + excellent choice to use on various systems. Normally the "T" + mode is sufficient except when talking with another person and + then the "E" mode at one end or "L" mode at both ends will + provide normal results. + T - if typed as the first (primary) option, puts the program directly + into "terminal mode", allowing it to send from the keyboard to + the other computer, and to copy anything coming from the other + computer with the exception of file transfers (use "R" to re- + ceive those). + R - used only for receiving files from the other computer. These are + usually sent in binary form with either checksum verification + or more commonly, CRC (Cyclic Redundancy Checking). If ready + to receive another file, you have several choices, depending + on the program used by the other computer. After notifying + him you are ready (or will be very shortly), you can tr 4 €windows which scroll together.#This command is used to hold column#€titles or row headings in place$while cells are scrolled. Parameters$€are:€%1. Number of rows to become a window%„across the top of the screen.!2. Number of columns to become a!!„window at the left of the screen.!€'The remaining display space becomes the'!€active window which is linked for!#nal window for&€synchronized scrolling€in the vertical direction.€€WINDOW SPLIT TITLES€ Splits active window into 2 o automatically + places you in a "ready to go again" situation when the trans- + fer is finished. + + Another "R" option would be: + + B>>COMMAND: RB + + This is called the "Batch mode" and is an extremely useful way + to receive programs automatically, from another computer using + a similar program. He will use the batch mode for sending the + programs and that automatically provides the file names at the + receiving end. In this manner, large numbers of programs can + be transferred completely automatically, including full disks. + (Assuming you care to pay the toll calls for the time it will + take!) + + NOTE: The ideal way to receive batch mode would be: + + B>>COMMAND: RBT + + since you may not know in advance how many programs he + will be sending. When the transfer is complete, you + are automatically in the "T" mode and he can start + typing to you, immediately, with any comments relative + to the progress of the transfer, etc. (He would use + the "E" mode.) + + S - Send programs. Similar to "R" but sends instead of receives. If + the other system is ready to receive, you can type: + + B>>COMMAND: S HELLO.DOC + + It will tell you how many records are involved and how many + minutes and seconds it will take to send the program. If the + other system is ready to receive, it starts the transfer, + showing how many records have been sent. If any errors occur + during transmission, it shows what they are and counts them. + It will resend any records not correctly received at the other + computer. If too many consecutive errors occur (normally set + at 10), the transfer is terminated. The batch mode may also + be used for sending: + + B>>COMMAND: SB HELLO.* + + will send all files starting with HELLO, or can send just one + file, or can send several non-related files in this manner: + + B>>COMMAND: SB HELLO.DOC XDIR.COM TERM.* + + etc. Be sure to put a space between the various files. You + can include the 'X' option: + + B>>COMMAND: SBX HELLO.* MDM712.LBR MDM712.AQM + + When the file transfer is completed it disconnects from the + phone line and reverts to CP/M. This allows you to be absent + when the file is finished, offering an advantage when sending + lengthy files. + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 2: +---------------------- + + Three Letter Commands + +CPM - Exit from this program to CP/M +DIR - List directory and space free (may specify drive) +ERA - Erase file (may specify drive) +LOG - Change default drive/user no. (specify drive/user) + and reset disks. e.g. LOG A0: or LOG B: (user # unchanged) +SPD - Set speed of file output in terminal mode +TIM - Select Baud rate for "time-to-send" message +TCC - Toggle CRC/Checksum mode on receive +TBR - Toggle backspace to rubout conversion +TLC - Toggle 1) local command immediate + 2) local command after CTL-^ +TLF - Toggle LF after CR when sending disk file in "T" mode +TXO - Toggle XOFF testing in terminal mode file output +NUM - List remote systems +SET - Set modem baud rate +BYE - Disconnect, then return to CP/M +CAL - Dial number +DSC - Disconnect from the phone line + + The following are terminal text buffer commands: + +DEL - Delete memory buffer and file +WRT - Write memory buffer to disk file + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, PAGE 2: +-------------------------------- + + CPM - This returns to normal CP/M use, abandoning MDM712. + CAUTION: It does not disconnect the modem from the phone line. + DIR - Enables the user to see the library of any disk without needing + to return to CP/M first. Can be adjusted when installing the + program to show 3, 4, or 5 groups depending on the width of + your CRT display. Normally set to 5 for 80-column displays. + Shows the amount of disk spacing remaining on the logged-in + default drive. (You must log in any drive you wish to write + on, or to see the correct free disk space remaining.) See the + LOG feature below. + ERA - Enables the user to erase any files from any disk without the + need to return to CP/M first. Wild cards (* and ?) accepted. + LOG - When a new disk is inserted, you can see the directory and read + files from it but cannot write to it without getting a "BDOS + ERR". This command allows you to log in a new disk so you can + immediately write on it without first returning to CP/M for a + warm boot. You can select drive and user number. (This also + enables DIR to show the correct free disk space remaining.) + You can say: + LOG for same drive, user area, new disk + LOG A + LOG A: + LOG A14 (user areas are 0-15) + LOG A11: + + SPD - Sets the delay between characters and/or delay between lines in + the "T" mode when using control-T to upload a pre-typed file. + Since most bulletin boards and TYM-SHAR systems normally use + line editors that require a delay after they have received a + line, you can add delay between characters (in increments of + 10 ms.) and/or enter delay between lines (in increments of 100 + ms.). This is preset for most systems at 50 and 500 ms. They + can be changed at any time. Current values can be checked by + using the " ? " command. + TIM - This option lets you set the file transfer time from 110 Baud to + 9600 Baud. You can preset it (when installing the program) to + the value normally used, but at times it is nice to be able to + conveniently change the time shown to a different rate. Some + initialization routines (discussed in the install section) can + make this change automatically. This command does not show if + using the PMMI* board as the speed is automatically changed to + agree with the current Baud rate selection. It also does not + show if the custom overlay uses the SET command to choose var- + ious Baud rates as the transfer time is changed automatically. + TCC - Most modem programs originally used simple checksum verification + of received sectors. Most now use Cyclic Redundancy Checking + which finds certain transmission errors the simple checksum + system might overlook. This toggle allows the user to select + checksum for those systems known to not offer CRC. When set + normally to CRC, the program automatically switches to check- + sum after trying several times to use CRC. + TBR - Some systems use the "rubout" key for backspace. This toggle + allows you to readily adapt to those systems. Rarely used. + TLC - Nearly all computers use "control-characters" to do various + tasks such as move the cursor around, clear the screen, reboot + the system, etc. You might want to send a control-E character + to the local computer and not have it go to the remote system + at the same time. Say a moment later you would like to send a + control-E only to the remote computer. You would do this: + + control-E (goes to local computer only) + control-^ control-E (goes to the remote computer only) + + You can reverse the TLC toggle causing this response: + + control-E (goes to remote computer only) + control-^ control-E (goes to the local computer only) + + All other control-chars. would operate in a similar manner. + This gives extra flexibility in using this program for special + systems like TYM-SHAR, etc. + + NOTE: If using control-^ is awkward, you can pick a different + character when installing the program initially. + + TLF - If sending a file while in terminal mode (via CTL-T option) most + mainframe computers will not want you to send a line feed. As + all editors include the LF after CR, you have the option with + this toggle of sending or not sending a line feed. If typing + manually in the "T" mode, you can get a line feed with CTL-J. + It is automatically included after CR with "L" or "E" modes. + TXO - Used when uploading pre-typed text files to other systems such + as TYM-SHAR or bulletin boards, etc. Most of those have line + editors that take a moment to move the line you just finished + from their edit buffer into memory. The XOFF character halts + your system from sending until it is ready for a new line. + Used only in the terminal mode. + NUM - Not shown if using PMMI*. This shows the non-PMMI* people the + phone library numbers which can be used for manual dialing. + SET - Not shown if using PMMI, or if SETUPR is set to "NO" (indicating + no user routine in the overlay for choosing different speeds.) + BYE - Disconnects the modem from the phone line, closes any file that + may be open and returns to CP/M. + CAL - PMMI* command, shows the phone library for auto-dialing. If not + using a PMMI*, this will not be shown, instead NUM is shown. + It displays the telephone library. (Non-PMMI users will find + the NUM display beneficial as it can display useful phone num- + bers for manual dialing.) + + NOTE: Use the phone number overlay to easily change the numbers + that are stored. This overlay also accesses up to two + alternate long distance dialing systems for the touch- + tone auto-dialing modems. + + DSC - Disconnects the modem from the phone line whenever selected. + DEL - If copying incoming information into memory, and you decide you + do not want to bother saving it to disk after all, this closes + (and then deletes) the disk file you had opened. + WRT - saves what you have been copying to the disk file already opened + for that purpose. When returning from the "T" mode to command + mode, a warning is shown that you may lose what has been saved + unless you use WRT (write to disk). + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, PAGE 3: +---------------------- + + Local Commands while in Terminal Mode + + CTL-@ - Send a break tone for 300 ms. + CTL-B - Change Baud rate + CTL-E - Exit to command mode + CTL-L - Send log-on message + CTL-N - Disconnect from the phone line + CTL-P - Toggle printer + CTL-Y - Start copy into buffer + CTL-R - Stop copy into buffer + + Start & Stop may be toggled as often as desired. + A ":" at start of line indicates buffer is copying. + XOFF automatically used to stop input when writing + full buffer to disk, XON sent to resume. + + CTL-T - Transfer ASCII file to remote + + CTL-^ - Send local control character to remote + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, PAGE 3: +-------------------------------- + + CTL-@ - Sends a break character to the other computer. Used in some + TYM-SHAR systems, etc. (Used only in PMMI mode) + CTL-B - PMMI command, changes the Baud rate from 110-710, in addition + changes the file transfer time accordingly. + CTL-E - Returns to command modem from "T", "L", "E" modes. + CTL-L - Will send the log-on message if TRANLOGON is set YES and a + message has been included in the LOGON area. Can use this + feature to sign on various bulletin board systems, although + that would require an identical password on each. + CTL-N - Disconnect the modem from the phone line. (CTL-D had been + used for this command, but it was too easy to accidently + type CTL-D when expecting to hit CTL-S or CTL-E or CTL-X. + You can easily change this to whatever you like in the + overlay you use for your equipment.) + CTL-P - Toggles the printer on-off. Very useful feature. Similar to + normal control-P but in this case if the modem is running + faster than normal printer speed, the characters just back + into a special buffer while the printer tries to catch up. + Most dot matrix printers are considerably faster than most + telephone modems, however. Can be toggled at any time you + are in the "T", "L" or "E" modes. Often used to copy items + from bulletin boards, etc. that are not worth permanently + saving on disk. + CTL-Y - Used only in terminal mode. If a file was opened prior to + going to "T" (terminal) mode, nothing will be saved until + control-Y is typed. This places a ";" (semicolon) at the + start of each new line, indicating the memory is "hot" and + is now copying for saving to a file. You can toggle this + off by using control-R. + + NOTE: To open a file use: COMMAND: T FILENAME.EXT and + then CTL-Y and CTL-R will control what is copied to + be placed in that file. + + CTL-R - Stops the copy into memory, shuts off the ";" at start of + each line. These two commands (CTL-Y to start, and CTL-R + to stop) control what is being saved. When returning to + command (via CTL-E), you will then be warned to save the + information to disk via the WRT command or it will likely + be lost. (You may never use CTL-R although CTL-Y is re- + quired to commence saving to memory for the disk file you + previously opened.) + + (These commands -- CTL-P, CTL-Y and CTL-R give + MDM712 tremendous versatility. You can copy + incoming data either to disk or to printer (or + both). My own printer is a 300 Baud Teletype + Corporation Model 43, yet it works great when I + am using the Bell 212A at 1200 Baud. The printer + falls behind, but misses nothing as it eventually + catches up with the contents of the large buffer.) + +- - - - - - - - - - - - - - - - - - + + +THE HELP GUIDE, SPECIAL PMMI PAGE: +--------------------------------- + + Additional Subcommands for PMMI Modems + +Modem control: + A - Answer tone for send or receive + O - Originate tone for send or receive + +Parity options: + 1 - Set and check for odd parity + 0 - Set and check for even parity + Both ends must be capable of these options + which are available only in R and S modes. + The parity checking will be part of the + file transfer protocol. + +Speed Options: + After entering your primary and secondary options, + you can set the modem speed by placing a "." after + the options followed by the speed e.g., 300, 1200. + + EXAMPLE: SBOT.600 will set the modem for 600 baud + + +Hit any KEY to CONTINUE + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF HELP GUIDE, SPECIAL PMMI PAGE: +------------------------------------------- + + When using MDM712 with the PMMI board, you will either dial out or +(far less likely) answer some incoming call. Since the unit will be in +"originate mode" about 98% of the time, it is set to automatically come +up in the originate mode at default speed (300 Baud) whenever a call has +been completed. If you want to use answer mode, you need to use the "A" +command. If a speed is not included, it will stay at the default speed. + + Until a connection has been made, there are no tones applied to the +line. Originate tones at 300 Baud are automatically added at that time. + + In addition to telling the PMMI modem if it should use originate or +answer tones, you can tell it what Baud rate to use. A typical command +(once connection is made to another modem) would be: + + B>>COMMAND: TO.600 + + This puts the tones on the phone line for originate and at the +same time sets the PMMI board for 600 Baud. Another typical response +might be: + + B>>COMMAND: RABT.450 + + This places the answer tones on the phone line, sets the program +for receiving batch mode at 450 Baud and returns to terminal mode when +the transfer is completed. + + Other optional PMMI commands seem self-explanatory, such as dis- +connect, etc. + +- - - - - - - - - - - - - - - - - - + + +PMMI, HAYES AND ROBOTICS AUTO-DIALING AND AUTO-REDIALING: +-------------------------------------------------------- + + There are several very useful and versatile features offered for +the PMMI, Hayes Smartmodem and Robotics users. These include alternate +long distance dialing systems. + + There are several ways to auto-dial. + + 1) from the command line + 2) from the phone number library line + + In addition you can auto-redial from either of these lines. Once +the number has auto-dialed and there is no answer, it will ask you if +you want it to continuously auto-redial until it does receive an answer +(or you decide to abort). + + To get the phone library, type CAL on the command line. You +then normally just type the alphabetic character at the start of the ap- +propriate line. It will show the number being dialed. You can also do +this from the main command line if you know in advance what alphabetic +character is associated with that particular number: + + B>>COMMAND: CAL P + + This calls up the "P" line in the library and dials that number, +then if busy asks if you want it to continue redialing. You can use: + + B>>COMMAND: CAL 313-749-6569 + + and it will dial the number specified. You can then do either of +these on the library command line, as well. This gives a tremendous +versatility. + +NOTE: To access the alternate long distance dialing systems (up to two + are offered), use the phone number overlay and fill in the infor- + mation regarding your access number, billing number, etc. It + will then show how to enter a special character ahead of each + phone number where alternate long distance system is desired. + This only works where touch-tone systems are in use. + +- - - - - - - - - - - - - - - - - - + + +CASCADING COMMANDS: +------------------ + + Several commands may be used on the same line. Ones normally used +are: A, B, D, E, L, O, Q, R, S, T, V, X (and Baud rate if PMMI). + + A typical PMMI selection might be: RABQ.300 + + The commands have been listed previously but will be listed here +again: + + A) answer tones for PMMI S-100 modem, puts tones online. + B) batch mode (must be used at both ends if used at all) + (usually only available modem-to-modem with operators + present at each end.) + E) echo mode for conversing with a system not offering echo. + L) local echo shows what you are sending if no remote echo. + O) originate tones for PMMI S-100 modem, puts tones online. + Q) quiet mode, suppresses messages on local console. + R) receive file transfers with CRC or checksum protocol. + S) send file transfers, also shows transfer time. + T) terminal mode - operates computer at other end like a remote + terminal. Also stands for "text mode". When in "T" mode + you can copy incoming to printer or to disk, and send pre- + typed ASCII text files via CTL-T. + V) visual -- lets you see incoming ASCII files while being sent + to the disk system. + + NOTE: The Baud rate is only used for the PMMI S-100 modem. + Many of the custom overlays allow use of the SET + command to change Baud rate with non-PMMI modems. + +- - - - - - - - - - - - - - - - - - + + +TYPICAL PARAMETERS SHOWN BY THE "?" COMMAND: +------------------------------------------- + + B> COMMAND (H for Help): ? + +Mode: CRC +Printer is OFF +Backspace is backspace +Modem speed is 300 baud +Termianl mode file buffer is inactive +Unused portion of buffer is 16384 bytes +Use CTL-^ to send local command to remote +Linefeed NOT sent after CR for disk file in T-mode +XOFF testing NOT used in terminal mode file output +XON NOT automatically tested after CR in terminal mode file output + +Char. delay (terminal file mode) is: 50 ms. per character +Line delay (terminal file mode) is: 500 ms. per character + +- - - - - - - - - - - - - - - - - - + + +DISCUSSION OF TYPICAL PARMETERS SHOWN BY THE "?" COMMAND: +-------------------------------------------------------- + + By this time, most of these parameters are self-explanatory. They +primarily show how the options and toggles have been set. The user can +check on any of the major parameters at any time by: + + 1) Typing control-E to return to command mode and + 2) Typing ? to see the list of current parameters. + +- - - - - - - - - - - - - - - - - - + + +INSTALLING THE PROGRAM: +---------------------- + + Although this is obviously the very first thing that needs to be +done, it was saved until last for several reasons. The most important +of these was the need to first explain what some of the options will do +when selected. + + By this time the user should have a fairly good idea what options +would work best for him. When looking at the beginning of the program +where the these are selected, it should now be rather easy to pick the +ones that are most useful. + + There are various ways to change the program to suit a specific +user. These are discussed to a modest extent in the information file +called MDM712.INF. You are offered several methods. The "easy way" is +to get MDM712.COM plus the appropriate overlay for your computer. You +then edit the overlay (if needed) to suit your local needs, assemble it +to get a .HEX file then use the simple instruction and DDT.COM to com- +bine the standard MDM712.COM file with your overlay. The front end of +each overlay contains all the information in the front of the MDM712 +source code itself. + + Generally no changes need to be made in specific overlays unless +you have some particular requirement different from others using the +same equipment. (Such as the log-on message, for example.) + + The "hard way" would be to get the MDM712.ASM source code (which +is around 112k and would take well over an hour to download at 300 Baud) +and then edit it to suit. This is likely to be quite unsatisfactory for +most users as it will not contain the information peculiar to your com- +puter (which is in the individual overlay you select otherwise.) + + Thus various methods are available, one of which should provide the +easiest method for your system. + +NOTE: Although designed with special emphasis on the auto-dialing and + redialing capability of the PMMI, Hayes Smartmodem or Robotics, + it works quite well on non-PMMI modems. In the author's system + a stock Bell 212A Dataphone is used together with a normal ser- + ial I/O that can be programmed to easily switch from 300 to 1200 + Baud. The system includes a Teletype Corp. Model 43 dot matrix + 300 Baud printer. A great variety of other computers and modems + can use this same program quite easily. This is likely the most + versatile phone modem program currently available for CP/M users. + +OUR THANKS TO: +------------- + + A great number of people have contributed to the growth of this +program since 1977. Two people have been particularly helpful to me in +developing the MDM700 series modem programs: Keith Petersen (W8SDZ) +and Frank Gaude' (ex-K6IBE). Their help and interest have been greatly +appreciated. + + We hope this verstile program will give you hours of enjoyment and +fulfill your modem needs. It has long been a goal of mine to provide +the same program for the people using the Hayes Smartmodem (or Robotics) +as for those using the PMMI 103 modem. + + + - Irv Hoff W6FFC + \ No newline at end of file diff --git a/2006/toledo2/MODEM7/MDM712KP.COM b/2006/toledo2/MODEM7/MDM712KP.COM new file mode 100644 index 000000000..750a622e8 Binary files /dev/null and b/2006/toledo2/MODEM7/MDM712KP.COM differ diff --git a/2006/toledo2/MODEM7/PIP.COM b/2006/toledo2/MODEM7/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/MODEM7/PIP.COM differ diff --git a/2006/toledo2/MODEM7/SETDISK.COM b/2006/toledo2/MODEM7/SETDISK.COM new file mode 100644 index 000000000..ad8d4db21 Binary files /dev/null and b/2006/toledo2/MODEM7/SETDISK.COM differ diff --git a/2006/toledo2/MODEM7/SYSGEN.COM b/2006/toledo2/MODEM7/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/MODEM7/SYSGEN.COM differ diff --git a/2006/toledo2/MODEM7/WASH.COM b/2006/toledo2/MODEM7/WASH.COM new file mode 100644 index 000000000..fa6ee3176 Binary files /dev/null and b/2006/toledo2/MODEM7/WASH.COM differ diff --git a/2006/toledo2/MODEM7/XDIR.COM b/2006/toledo2/MODEM7/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/MODEM7/XDIR.COM differ diff --git a/2006/toledo2/MOVCPM.COM b/2006/toledo2/MOVCPM.COM new file mode 100644 index 000000000..8790cdb56 Binary files /dev/null and b/2006/toledo2/MOVCPM.COM differ diff --git a/2006/toledo2/PIP.COM b/2006/toledo2/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/PIP.COM differ diff --git a/2006/toledo2/PRO8/-PRO8.ROM b/2006/toledo2/PRO8/-PRO8.ROM new file mode 100644 index 000000000..e69de29bb diff --git a/2006/toledo2/PRO8/-READ.ME# b/2006/toledo2/PRO8/-READ.ME# new file mode 100644 index 000000000..46c0f53ea --- /dev/null +++ b/2006/toledo2/PRO8/-READ.ME# @@ -0,0 +1,149 @@ +-READ.ME + + +You will not be able to boot this diskette. Boot your PRO8 system from +your usual system disk. IMPORTANT: Make a copy of this disk and put it +away in a safe place. + +If you've done a speed-up modification to your Kaypro you may need to +switch your machine back to 2.5MHz before using the COPY programs. +You may try it at 5MHz but go to the slower speed if you have any +problems. + +When transferring files between different floppy formats and +different drive types, it is more efficient to use PIP.COM. + +This disk contains all the files you will need to use and modify your +PRO8 system. + +Other New Files and their uses..................................... + + + +CONFIG83.COM This is your new replacement for the CONFIG program + that you got with your Kaypro. It is modified to work + with 63k CP/M systems. Use it as you would your old + CONFIG. This program also allows you to set + configuration data for the PRO8 system. + +RCONFIG.COM The PRO8 rom Version 3 can support the Micro Sphere +RF.COM ram disk. If you have their ram disk see RDISK.DOC +RDISK.DOC for information on these files. + + +************** NOTES ON THE PRO 8 AND 4+ MODIFICATIONS **************** + +** CAUTION **** CAUTION **** CAUTION **** CAUTION **** CAUTION ** +When working on the drive cables (NEAR THE SWITCHING POWER SUPPLY), +please disconnect the power cord from the power jack located at the +rear of the cabinet. Switching power supplies are touchy creatures. + +Drive Idiosyncrasies: + +Jumper options for most drives are located directly behind or near the +drive data cable edge connector. Terminator resistor packs are located +near the jumper options and are usually socketed. + +************ +TEAC DRIVES: +************ + +Teac drive ribbon connectors are mounted upside down from other drive +manufacturers. If you mix Teac drives with Tandon drives the drive data +cable may be too short. + +To jumper the Teacs change the HS option to the HM option. The drive select +options are set by DS0-DS1. Drive A: corresponds to DS0; drive B: +corresponds to DS1, etc., also remove the IU jumper. + +******************** +TANDON 101-4 DRIVES: +******************** + +To set up the jumpers do the following: +1. W9 open +2. W19 closed +3. Jumper on W13 - sets up for 6ms step rate +4. W10 open +5. W11 open +6. W12 open +7. W14 open + +To jumper drive select do the following: +1. W1 ==> drive A: +2. W2 ==> drive B: +3. W3 ==> drive C: +4. W4 ==> drive D: + +The onboard processor only checks the jumper options upon power-up so make +sure you power down after the jumpers have been set. + +*********** +CDC DRIVES: +*********** + +Make sure the "M" option is jumpered and drive selection is done by +jumpering drive number 1 for drive A:; 2 for drive B: and so on. + +************************ +MITSUBISHI M4853 DRIVES: +************************ + +Move the HS jumper option to the HM option. Drive select options are +DS0-DS3, these correspond to drive A: - drive D: respectively. The +terminators are soldered in but there are 7 jumpers located behind the +terminator. Removing these jumpers isolates the terminator from the board. + +4+ Notes: + +Teac 55 series are half power drives, therefore four drives can operate +off of the KAYPRO power supply with our 4+ decoder board. Tandon or CDC +drives (if you add drive C and D) will require their own power source. + +Make sure you only have one terminator (resistor pack) located on the last +physical drive of your system. Exceptions to this statement follow: + +If you are using 4 Teac 55 drives then the terminator needs only to be on +drive D:. If you are using drives (for C and D) that require their own +power supply then a terminator is required on drive B: as well as on +drive D:. A 600 OHM terminating resistor pack should do the trick. +This way when you need to take your KAYPRO and use it independent of your +C: and D: drives, drive A: and B: will be protected by the terminator on +B:. + +Decoder Board Installation: + +Remove the (drive) I/O cable from the mother board at J6. The decoder +board plugs onto the exposed male header at J6. The orientation of the +decoder board is male right angle pins toward the drives. The micro-clip +has to be attached to +5 volts; J5 pin 6 will do. + +PRO 8 Notes: + +Kaypro II to 4 conversion: +When picking up A11 from U59 DO NOT bend out pin 2, just tack on to the +exposed part of the pin. Don't forget to change U73 to the 74S04, this +faster part is critical for the select pulse from U72. + +** CAUTION ** +It is recommended that a 3 wire soldering iron be used on all modifications. +This will eliminate the probability of damage to any static sensitive chips +you may be soldering on. + +**** If you are having problems and have an old Kaypro check U82 +(the floppy disk controller). If it is a 1793 disregard the rest of this +note. If it is a 1791 you must do the side select circuit a little +differently. Bend out pin 6 of U73 and solder from this bent out pin to +pin 32 of J6. (Before you had jumpered from U73 pad 6 to J6 pin 32. Remove +that jumper). Now bend out pin 13 of U72 (the PIO). Jumper from this bent +out pin to the bent out pin 5 of U73. (Originally we jumpered to E40, +remove that jumper). The reason for this is that the original design of +the Kaypro used this line to strobe or test for busy on the unused side of +the system port. This arrangement was never used for anything but it tied +up that bit on the PIO. We are just avoiding that traffic by direct +jumpering. + + + + + \ No newline at end of file diff --git a/2006/toledo2/PRO8/8DISKTST.COM b/2006/toledo2/PRO8/8DISKTST.COM new file mode 100644 index 000000000..d04026b0b Binary files /dev/null and b/2006/toledo2/PRO8/8DISKTST.COM differ diff --git a/2006/toledo2/PRO8/AUTOLOAD.COM b/2006/toledo2/PRO8/AUTOLOAD.COM new file mode 100644 index 000000000..cdd1fd540 Binary files /dev/null and b/2006/toledo2/PRO8/AUTOLOAD.COM differ diff --git a/2006/toledo2/PRO8/AUTOLOAD.Z80 b/2006/toledo2/PRO8/AUTOLOAD.Z80 new file mode 100644 index 000000000..e48dc8412 --- /dev/null +++ b/2006/toledo2/PRO8/AUTOLOAD.Z80 @@ -0,0 +1,168 @@ +version equ 0 + .z80 + .radix 16 + +bdos equ 5 +fcb equ 5c +fcb2 equ 6c + +cr equ 0d +lf equ 0a + +boot equ 0 +conin equ 1 +conout equ 2 +lstout equ 5 +dconio equ 6 +linout equ 9 +linin equ 0a +const equ 0b +reset equ 0d +seldsk equ 0e +openf equ 0f +closef equ 10 +searf equ 11 +searn equ 12 +deletf equ 13 +redseq equ 14 +wrtseq equ 15 +creatf equ 16 +renamf equ 17 +setdma equ 1a +redran equ 21 +wrtran equ 22 +filsiz equ 23 + +; + jp start +; + +cpm macro function,info + + if not nul function + ld c,function + endif + + if not nul info + ld de,info + endif + + call bdos + +endm + +; + +print macro string + + call type + dc string + +endm + +; +; + +type:: ex (sp),hl +type1:: ld e,(hl) + push hl + cpm conout + pop hl + ld a,(hl) + inc hl + and a + jp p,type1 + ex (sp),hl + ret + +; + +crlf macro + cpm conout,cr + cpm conout,lf +endm + + +; * * +;**************** main entrance ******************* +; * * + +settrk:: + ld hl,(1) + ld de,1Bh + add hl,de + jp (hl) +setsec:: + ld hl,(1) + ld de,1Eh + add hl,de + jp (hl) +rd_sector:: + ld hl,(1) + ld de,24h + add hl,de + jp (hl) +writesec:: + ld hl,(1) + ld de,27h + add hl,de + ld c,1 + jp (hl) + +start:: + print 'Autoload version 1.' + cpm conout,version+'0' + print ' by Bruce Berryhill' + crlf +which: crlf + print 'Which drive do you want to write the autoload system on? ' + cpm conin + res 5,a + cp 'A' + jp c,which + cp 'Q' + jp nc,which + sub 'A' + ld e,a + cpm seldsk + crlf + crlf + print 'Enter the command to run on cold boot: ' + cpm linin,keybuf + ld hl,keybuf+1 + ld b,(hl) + inc hl +up_loop:: + ld a,(hl) + cp 'a' + jp c,next + cp 'z'+1 + jp nc,next + res 5,(hl) +next:: inc hl + djnz up_loop + ld (hl),0 + ld bc,0 + call settrk + ld bc,1 + call setsec + cpm setdma,80 + call rd_sector + ld de,87 + ld hl,keybuf+1 + ld a,(hl) + ld c,a + inc c + inc c + ld b,0 + ldir + call writesec + crlf + print 'Done' + crlf + jp 0 + +keybuf:: db 50 + + end start + \ No newline at end of file diff --git a/2006/toledo2/PRO8/CONFIG83.COM b/2006/toledo2/PRO8/CONFIG83.COM new file mode 100644 index 000000000..1e581c33c Binary files /dev/null and b/2006/toledo2/PRO8/CONFIG83.COM differ diff --git a/2006/toledo2/PRO8/CPY.COM b/2006/toledo2/PRO8/CPY.COM new file mode 100644 index 000000000..079ff0460 Binary files /dev/null and b/2006/toledo2/PRO8/CPY.COM differ diff --git a/2006/toledo2/PRO8/CRC.COM b/2006/toledo2/PRO8/CRC.COM new file mode 100644 index 000000000..0f0396e39 Binary files /dev/null and b/2006/toledo2/PRO8/CRC.COM differ diff --git a/2006/toledo2/PRO8/CRC.DOC b/2006/toledo2/PRO8/CRC.DOC new file mode 100644 index 000000000..1f84dd427 --- /dev/null +++ b/2006/toledo2/PRO8/CRC.DOC @@ -0,0 +1,21 @@ + + + + Using CRC + + + + + Type CRC to verify all the files on this disk. + + Type CRC *.* F to generate CRC's for an entire disk and create + a CRC file (CRCKLIST.CRC) for checking the CRC's of a + copy of the disk etc. + + Omitting the F will suppress creation of a CRCKLIST.CRC file. + + *.* can be replaced with an unambiguous file name for checking + just one file. + + + \ No newline at end of file diff --git a/2006/toledo2/PRO8/CRCKLIST.CRC b/2006/toledo2/PRO8/CRCKLIST.CRC new file mode 100644 index 000000000..3ba70ab96 --- /dev/null +++ b/2006/toledo2/PRO8/CRCKLIST.CRC @@ -0,0 +1,15 @@ + +--> FILE: RDISK .DOC CRC = E9 4F +--> FILE: AUTOLOAD.COM CRC = 1F FA +--> FILE: CONFIG83.COM CRC = 6A 57 +--> FILE: AUTOLOAD.Z80 CRC = F1 97 +--> FILE: CPY .COM CRC = 57 EC +--> FILE: D .COM CRC = 66 48 +--> FILE: -READ .ME CRC = 98 E7 +--> FILE: RCONFIG .COM CRC = 96 13 +--> FILE: SYS .COM CRC = 34 BC +--> FILE: RF .COM CRC = E0 A4 +--> FILE: CRC .COM CRC = B2 07 +--> FILE: CRC .DOC CRC = E5 81 +--> FILE: DISKTEST.DOC CRC = 46 B3 +--> FILE: 8DISKTST.COM CRC = 4D 5A \ No newline at end of file diff --git a/2006/toledo2/PRO8/D.COM b/2006/toledo2/PRO8/D.COM new file mode 100644 index 000000000..e1ae870d8 Binary files /dev/null and b/2006/toledo2/PRO8/D.COM differ diff --git a/2006/toledo2/PRO8/DISKTEST.DOC b/2006/toledo2/PRO8/DISKTEST.DOC new file mode 100644 index 000000000..a7a4282d5 --- /dev/null +++ b/2006/toledo2/PRO8/DISKTEST.DOC @@ -0,0 +1,220 @@ +Z-80 Floppy Disk Test + +Original Version: Copyright (c) 1980 by Laboratory Microsystems + 4147 Beethoven Street + Los Angeles, California 90066 + + + +1.0 General description + +The Z-80 Floppy Disk Test is a general purpose utility for testing or +initializing a diskette. It requires a Z-80 microprocessor, at least +16 kbytes of random access memory, two flexible disk drives, and the +Digital Research CP/M 2.x operating system. Program mode and area of +diskette to be tested are controlled from the keyboard. Errors may be +audited on the console or the line printer. + +The proram is available on this diskette in 4 versions. + +2DISKTST.COM Is assembled for the Kaypro 2 (191 K / disk) +4DISKTST.COM Is assembled for the Kaypro 4 (390 K / disk) +8DISKTST.COM Is assembled for Kaypro's with 96 TPI dbl. sided + disk drives ( Like the Pro 8 System from Micro + Cornucopia ). +10DSKTST.COM Is assembled for the Kaypro 10 and will only test + the floppy drive on that system. DO NOT use the + disk diagnostic on the HARD DISK !!!!!!!!!!!!!!!! + +The program does not exhaustively check out the disk drive, and any +errors detected by the program must be interpreted with care. +Intermittent errors occurring throughout a broad range of disk +addresses probably indicate a problem with the disk drive unit. +Errors indicated at consistent addresses within adjacent tracks may +result from a worn or damaged flexible disk. Error free execution of +the test certainly indicates an intact and usable diskette, and also +is fairly good evidence of proper operation of your disk drive. Note +that the program is rather insensitive to drive problems related to +head movement, since the diskette is addressed in a smooth sequential +manner. + + +2.0 Installation + +Mount your system disk in drive A, and the distribution disk in drive +B. Use the PIP utility to transfer the test program onto the system +disk: + + A>pip a:=b:dtst.com [v] + +Now remove the distribution disk from drive B and store it as the +backup copy. + + +3.0 Using the Test Program + +Put your system disk in drive A, boot up the CP/M operating system, and +type: + + A>dtst + +The test program will load into memory and print the identifying +message: + + Laboratory Microsystems Disk Test version 1.0 + +If there is inadequate memory in the transient program area, or if the +operating system is not CP/M version 2.0 or greater, the program will +immediately print a warning message and exit. Otherwise, the test +proceeds to the initialization dialogue. The test mode is set via a +series of questions presented on the system console. Answers calling +for an alphabetic character may be upper or lower case; a carriage +return is not required. Answers calling for a number must be two +digits, or one digit followed by a carriage return. + +query responses explanation +----- --------- ----------- + +Itemize errors? Y or N If answered y, each error + detected is audited on the + selected device. If answered + N, only the total error count + is printed at the end of each + pass. + +Console or Printer? C or P If itemizing errors, select + the device on which the + itemized error listing will be + printed. + +Lock on read or write? N, R, or W N = no locks. R = lock on + read mode (no data is written + to the disk --- useful for + detecting any damaged areas on + the media). W = lock on write + (all data on the disk is + destroyed --- this may be used + to erase a diskette by also + locking on pattern) + +Restore original data? Y or N Y = restore existing data on + diskette after testing each + sector. N = do not restore + existing data. Test runs much + faster when restore mode is + not used. + +Lock on data pattern? Y or N Y = user wishes to specify + specific data to be used as + the test pattern. N = random + data pattern is generated by + the test program. + +Enter data pattern hex 00-FF If you answered Y to Lock On + Pattern, enter the eight bit + data pattern to be used during + disk testing. If you answered + N, this question is bypassed. + +Drive to be tested Specify disk drive to be used + for diskette testing. + +Test all tracks? Y or N Y = test all tracks (00-76) in + sequence. N = user wishes to + specify range of tracks (may + be used to test only part of a + diskette, or if disk drive is + other than Kaypro Format. + +First track to test decimal 00-999 If you answered N to Test All + Tracks, specify here the + number of the first track to + test. + +Last track to test decimal 00-999 If you answered N to Test All + Tracks, specify here the + number of the last track to + test. Must be the same or + greater than the number of the + first track to test. + +Test all sectors? Y or N Y = test all sectors (0-39) in + sequence. N = user wishes to + specify range of sectors (may + be used to test only part of + each track, or if disk drive + is other than Kaypro format. + +First sector to test decimal 0-39 If you answered N to Test All + Sectors, specify here the + number of the first sector to + test on each track. + +Last sector to test decimal 0-39 If you answered N to Test All + Sectors, specify here the + number of the last sector to + test on each track. Must be + the same or greater than the + number of the first sector to + test. + +How many test passes? decimal 01-99 Enter the number of test + passes to be made on the + diskette. At least one pass + is always made even if you + enter zero. + +After entry of the number of test passes, the program immediately +begins executing. The program may be interrupted by pushing any key, +however response may be delayed for several seconds depending on the +speed of the processor and disk drive. Do not stop the test by +resetting the computer system if you are using restore mode, or +unpredictable amounts of data may be lost. + + +4.0 Error Listing + +Errors detected by the program may be itemized on the system console +or the line printer. The pass, drive name, track, and sector where +the error occurred are listed. All numbers are in decimal. The error +type is designated at the right. In the explanations below, "hardware +error" signifies an error status code returned from the low level disk +driver, and usually means a CRC fault or seek incomplete. + + +error type explanation +---------- ----------- + +read error - original data If running in restore mode, hardware + read error noted as the original data + was being loaded into memory. + +write error - test data Hardware error noted as the test data + pattern was being written on the + diskette. + +read error - test data Hardware error noted as the test data + pattern was being read back from the + diskette. + +compare error - test data Difference was found between the data + pattern that was written to the + diskette and the data that was read + back. + +write error - restore phase Hardware error noted as the original + data was being written back to the + diskette. + +read error - restore phase Hardware error noted as the restored + original data was being read back for + verification. + +data cannot be restored Compare error found between the + original data rewritten to the + diskette and the same sectors read + back for verification. + + + + \ No newline at end of file diff --git a/2006/toledo2/PRO8/RCONFIG.COM b/2006/toledo2/PRO8/RCONFIG.COM new file mode 100644 index 000000000..21478adaf Binary files /dev/null and b/2006/toledo2/PRO8/RCONFIG.COM differ diff --git a/2006/toledo2/PRO8/RDISK.DOC b/2006/toledo2/PRO8/RDISK.DOC new file mode 100644 index 000000000..61d1c5354 --- /dev/null +++ b/2006/toledo2/PRO8/RDISK.DOC @@ -0,0 +1,42 @@ + +Using Micro Sphere's Ram Disk with the PRO8 version 3 + + +The ROM contains code to treat the Ram Disk as any other disk drive. +It allows you to use the screen dump with or without the the ram disk +attatched. Before accessing the ram disk you must have a 63K system. +Run RCONFIG.COM. When asked if you want to install a new bios answer +yes. The bios contains the necessary code to allow the Ram Disk and +drive A: to be swapped. RCONFIG allows you to choose any letter for +the ram disk and the swap drive letter. + +Also select the correct ram disk size for your particular ram disk. +Exit the program and press the reset button. Your warm boot sign on +will now reflect the status of the ram disk. It will always say 'Off' +until you access the ram disk. If the ram disk is not connected or +not working, you will get a BDOS error SELECT. If it is alive you will +log on to the ram disk. The ram disk is the drive you chose in the +configuration program unless you swap it with drive A: by entering the +letter you chose for the swap code. At this point your ram disk becomes +drive A: and floppy drive A: can be accessed by using the letter you +assigned the ram disk. Entering the swap code a second time reverses +this procedure. + +If you don't want the new bios (because you are running Plu Perfect or +some other enhanced bios) you can still use the Ram Disk code in ROM. +First run RCONFIG but do not install the new bios. Just set the ram disk +size and write it to disk. To access the Ram Disk after a reset, you must +first enter an ESC H to wake it up. It will then be available as drive +E: only. + +The printer buffer on the ram disk won't work until you access the ram +disk first. + +RAM DISK COMMANDS: + +ESC P pause the ram disk printer buffer (stop printing until another ESC P) +ESC H halt the ram disk printer buffer (stop printing and clear buffer) + +RF.COM formats and/or sysgens the Ram Disk. + + \ No newline at end of file diff --git a/2006/toledo2/PRO8/RF.COM b/2006/toledo2/PRO8/RF.COM new file mode 100644 index 000000000..d5febff36 Binary files /dev/null and b/2006/toledo2/PRO8/RF.COM differ diff --git a/2006/toledo2/PRO8/SYS.COM b/2006/toledo2/PRO8/SYS.COM new file mode 100644 index 000000000..11f11be85 Binary files /dev/null and b/2006/toledo2/PRO8/SYS.COM differ diff --git a/2006/toledo2/README.md b/2006/toledo2/README.md index cf69b3def..0c922181a 100644 --- a/2006/toledo2/README.md +++ b/2006/toledo2/README.md @@ -148,7 +148,7 @@ example: ./toledo2 DDT.COM ``` -When the A> prompt appears, do: +When the `>` prompt appears, do: ``` IMPORT DDT.COM diff --git a/2006/toledo2/SETDISK.COM b/2006/toledo2/SETDISK.COM new file mode 100644 index 000000000..8ea207799 Binary files /dev/null and b/2006/toledo2/SETDISK.COM differ diff --git a/2006/toledo2/SOURCE/-CPMWORK.009 b/2006/toledo2/SOURCE/-CPMWORK.009 new file mode 100644 index 000000000..e69de29bb diff --git a/2006/toledo2/SOURCE/ASM.COM b/2006/toledo2/SOURCE/ASM.COM new file mode 100644 index 000000000..a6a54da56 Binary files /dev/null and b/2006/toledo2/SOURCE/ASM.COM differ diff --git a/2006/toledo2/SOURCE/BAUD.COM b/2006/toledo2/SOURCE/BAUD.COM new file mode 100644 index 000000000..f7fd7bb5a Binary files /dev/null and b/2006/toledo2/SOURCE/BAUD.COM differ diff --git a/2006/toledo2/SOURCE/CONFIG.ASM b/2006/toledo2/SOURCE/CONFIG.ASM new file mode 100644 index 000000000..4f9eef1db --- /dev/null +++ b/2006/toledo2/SOURCE/CONFIG.ASM @@ -0,0 +1,1256 @@ +false equ 0 +true equ not false +debug equ false + .list ;begin listing +title KAYPRO CONFIG (custom configuration utility program) 2.0 Copyright (C) 1982 NLS, Inc. +page +;############################################################### +;## KAYPRO II CONFIG PROGRAM ## +;## containing within it the new cbios image so that ## +;## if this is run against a disk with the old cbios ## +;## it is updated at the same time. ## +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 11,1982 ## +;## by jim nickerson ## +;## -allow redefinition of cursor keys ## +;## -allow redifinition of keypad keys ## +;## -allow redefinition of default i/o byte ## +;## -allow changing of the baud rate ## +;## -write these changes to disk ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + +; +; begining of the config program +; + jp config ;begining of program +; +mprint: + ld a,(de) ;get char + cp 0FFH ;end + ret z ;finished + push de + ld c,2 + ld e,a + call 5 + pop de + inc de + jr mprint +; +sprint macro arg + ld de,arg ;pointer to print line + call mprint + endm +; +; +printone macro + push af ;save char + ld c,2 ;console output + ld e,a ;char + call 5 + pop af ;recover char + endm +; +; +inone macro + local loop +loop: + ld c,6 ;direct console input + ld e,0FFH + call 5 + cp 0 ;0=nochar + jr z,loop ;wait for char + endm +; +; +jmpif macro arg, adr + cp arg + jp z, adr + endm +; +;print a message using bdos call +cr equ 0DH +lf equ 0AH +uprint macro x + ld c,9 + ld de,x ;message pointer + call 5 ;pass it to bdos + endm +; +;get a char from the console, up case +input macro + ld c,1 ;console input + call 5 ;pass it to bdos + endm +; +;*************************************************************** +;*************************************************************** +; +config: ;begining of the config program with main menu +; +;**************************************************************** +;**************************************************************** +; + ld a,1 + ld (disk),a ;force drive B + ld a,0FFH + ld (change),a ;changes flag 0=yes some changes +; +first: + uprint menuheader + uprint menu0 + input ;get an answer + push af ;save char + uprint crlf + pop af + jmpif '1',setio ;menu1 + jmpif '2',setwr ;menu2 + jmpif '3',setcur ;menu3 + jmpif '4',setnum ;menu4 + jmpif '5',setbaud ;menu5 + jmpif 01BH,go$out + jp first +; +setbaud: + uprint menuheader + uprint menu5 + input + push af + uprint crlf + pop af + jmpif '1',hbaud + jmpif 01BH,first + jmpif '2',dobaud + jp setbaud +; +dobaud: + uprint baudinst +dob1: + ld a,0 + ld (curline),a ;which choice + uprint firstchoice +dob2: + inone ;get a key + cp 01BH + jr z,setbaud + cp lf + jp z,db1 + cp cr + jr nz,dob2 + ;was a cr so we have a choice + ld a,(curline) + cp 16 ;wants to exit + jp nc,dob2 + out (0),a ;set baud rate + jp setbaud +; +db1: + ld a,(curline) ;where are we + inc a ;bump pointer + ld (curline),a ;save for future use + cp 17 ;end of choices + jr z,dob1 + uprint nextline ;advance one line + jr dob2 ;next line +curline: defb 0 +baudinst: + defb 1AH + defb ' 50',cr,lf + defb ' 75',cr,lf + defb ' 110 Move the cursor to the baud rate which',cr,lf + defb ' 134.5',cr,lf + defb ' 150 you want to use by typing the [LINE FEED] key.',cr,lf + defb ' 300',cr,lf + defb ' 600',cr,lf + defb ' 1200 When the cursor is at the rate you want',cr,lf + defb ' 1800',cr,lf + defb ' 2000 type the RETURN key and it will be set.',cr,lf + defb ' 2400',cr,lf + defb ' 3600 The new baud rate will be effective now.',cr,lf + defb ' 4800',cr,lf + defb ' 7200',cr,lf + defb ' 9600',cr,lf + defb '19200',cr,lf + defb 'Type [ESC] key to return to the previous menu (no changes)',cr,lf + defb cr,lf,lf + defb '(* NOTE: The baud rate will always default to 300 baud *)',cr,lf + defb '(* after the power is first turned on and when *)',cr,lf + defb '(* the RESET button is pressed. *)',cr,lf + defb '$' +firstchoice: + 01EH,0CH,0CH,0CH,0CH,0CH,'$' +nextline: + 0AH,'$' +; +hbaud: ;tell him about baud rates + uprint baudmsg + uprint crtocont + input + jp setbaud +; +setnum: + uprint menuheader + uprint menu4 + input + push af + uprint crlf + pop af + jmpif '1',hnum + jmpif '2',donum + jmpif 01BH,first + jp setnum +; +getone: + ld a,(curline) + inc a + ld (curline),a ;bumped pointer + call hex2in ;get 2 hex chars in c + jr nz,gadj +;wants to exit maybe + cp lf ;move cursor + ret z + ;must be esc then + pop hl ;clean stack + ld hl,(gohere) + jp (hl) ;oblidge him + ret z +;adjust changes flag +gadj: + ld a,0 + ld (change),a ;yes some changes +; +;record changes in mem image of cbios + ld de,0 + ld a,(curline) ;put here -1 + dec a + ld e,a + ld hl,(puthere) ;where to put changes + add hl,de ;hl points to char + ld a,c ;get char + ld (hl),a ;put him in mem + ret +; +; get two hex chars +hex2in: + inone ;get one key + cp 0AH ;move to next position + ret z + cp 01BH + ret z ;exit on esc + cp 030H ;0 the lowest one allowed + jr c,hex2in + cp 03AH ;tween 0 and 9 + jr c,setone + res 5,a ;make upper case if lower + cp 047H ;F the highest allowed + jr nc,hex2in + cp 041H ;must not be less than A + jr c,hex2in + printone + sub 7 ;remove bias + jr seta +setone: + printone +seta: + sub 030H ;take off bias + rlc a ;slowly + rlc a ;shift the + rlc a ;low nible + rlc a ;to the high nible + and 0F0H ;mask off the low nible + push af ;save it +settwo: ;force him to enter second char in hex + inone ;get one key + cp 0AH + jr z,s2 + cp 01BH + jr nz,s3 +s2: + pop hl ;clean stack + ret ;with z set to exit +s3: + cp 030H + jr c,settwo ;not acceptable + cp 03AH ;tween 0-9 + jr c,set3 + res 5,a ;make upper case if lower + cp 047H + jr nc,settwo ;not acceptable + cp 041H + jr c,settwo ;nogood + printone + sub 7 ;remove bias + jr set4 +set3: ;got second char in hex + printone +set4: + sub 030H + and 0FH ;ONLY WANT LOW NIBLE + ld c,a ;save it + pop af ;recover high nible + or c ;assembled char + ld c,a ;save char in a + ret nz + inc a ;must ret not zero + ret +; +; +donum: + ld hl,setnum + ld (gohere),hl ;where to exit to on esc + ld hl,cbios+039H + ld (puthere),hl + uprint numchoices +donum1: + ld a,0 ;first choice + ld (curline),a + sprint key0 + call getone + sprint key1 + call getone + sprint key2 + call getone + sprint key3 + call getone + sprint key4 + call getone + sprint key5 + call getone + sprint key6 + call getone + sprint key7 + call getone + sprint key8 + call getone + sprint key9 + call getone + sprint key10 ;- + call getone + sprint key11 ;, + call getone + sprint key12 ;enter + call getone + sprint key13 ;. + call getone + sprint key14 ;return +numpat: + inone + cp 01BH ;ESC + jp z,setnum + cp lf + jr nz,numpat + jp donum1 +; +numchoices: + defb 01AH + defb '----------------------------- Move the cursor to the key you wish',cr,lf + defb ': : : : :',cr,lf + defb ': 7 : 8 : 9 : - : to change. Use the [LINE FEED] key.',cr,lf + defb ': : : : :',cr,lf + defb ': 37 : 38 : 39 : 2D : The default HEXADECIMAL code will be',cr,lf + defb ';------;------;------;------:',cr,lf + defb ': : : : : the number which is flashing.',cr,lf + defb ': 4 : 5 : 6 : , :',cr,lf + defb ': : : : :',cr,lf + defb ': 34 : 35 : 36 : 2C : When you reach the key you wish to change.',cr,lf + defb ':------:------:------:------:',cr,lf + defb ': : : : : Type in the new HEXADECIMAL code.',cr,lf + defb ': 1 : 2 : 3 : :',cr,lf + defb ': : : : :',cr,lf + defb ': 31 : 32 : 33 : ENTER: (* NOTE: you must enter both digits *)',cr,lf + defb ':------:------:------: :',cr,lf + defb ': : : 0D : (* to change the code. *)',cr,lf + defb ': 0 : . : :',cr,lf + defb ': : : :',cr,lf + defb ': 30 : 2E : : Type the [ESC] key to return to the previous menu',cr,lf + defb '-----------------------------',cr,lf + defb '$' +; +key0: defb 01BH,'=',19+20H,6+20H,0FFH +key1: defb 01BH,'=',14+20H,3+20H,0FFH +key2: defb 01BH,'=',14+20H,10+20H,0FFH +key3: defb 01BH,'=',14+20H,17+20H,0FFH +key4: defb 01BH,'=',9+20H,3+20H,0FFH +key5: defb 01BH,'=',9+20H,10+20H,0FFH +key6: defb 01BH,'=',9+20H,17+20H,0FFH +key7: defb 01BH,'=',4+20H,3+20H,0FFH +key8: defb 01BH,'=',4+20H,10+20H,0FFH +key9: defb 01BH,'=',4+20H,17+20H,0FFH +key10: defb 01BH,'=',4+20H,24+20H,0FFH +key11: defb 01BH,'=',9+20H,24+20H,0FFH +key12: defb 01BH,'=',16+20H,24+20H,0FFH +key13: defb 01BH,'=',19+20H,17+20H,0FFH +key14: defb 01BH,'=',19+20H,41+20H,0FFH +hnum: + uprint nummsg + uprint crtocont + input + jp setnum +; +setcur: + uprint menuheader + uprint menu3 + input + push af + uprint crlf + pop af + jmpif '1',hcur + jmpif 01BH,first + jmpif '2',docur + jr setcur +; +; +docur: + ld hl,cbios+035H ;WHERE TO PUT CHANGES + ld (puthere),hl + ld hl,setcur + ld (gohere),hl ;ret here on esc + uprint curinst +doc1: + ld a,0 + ld (curline),a ;item to change + sprint cur0 ;left cursor key + call getone ;input etc + sprint cur1 + call getone + sprint cur2 + call getone + sprint cur3 + call getone + sprint cur4 ;type esc to exit +doc4: + inone ;get one key + cp 0AH + jp z,doc1 + cp 01BH + jr nz,doc4 + jp setcur +; + jp doc1 ;again +hcur: + uprint vecmsg + uprint crtocont + input + jp setcur +; +; +curinst: + defb 01AH + defb cr,lf + defb cr,lf + defb ' ---------------------------------',cr,lf + defb ' : : : : :',cr,lf + defb ' : ^ : : : <- : -> :',cr,lf + defb ' : : : v : : :',cr,lf + defb ' : : : : :',cr,lf + defb ' : 0B : 0A : 08 : 0C :',cr,lf + defb ' ---------------------------------',cr,lf + defb cr,lf + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb ' Move the cursor to the key which you wish to change by pressing',cr,lf + defb ' the [LINE FEED] key. The default HEXADECIMAL code will be the flashing number.',cr,lf + defb ' Type the new HEXADECIMAL number you wish to assign to the key.',cr,lf + defb cr,lf + defb ' You must type both digits to effect the change.',cr,lf + defb cr,lf + defb '$' +; +cur0: defb 01BH,'=',7+20H,15+20H,0FFH +cur1: defb 01BH,'=',7+20H,23+20H,0FFH +cur2: defb 01BH,'=',7+20H,31+20H,0FFH +cur3: defb 01BH,'=',7+20H,39+20H,0FFH +cur4: defb 01BH,'=',11+20H,18+20H,0FFH +setwr: + uprint menuheader + uprint menu2 + input + push af + uprint crlf + pop af + jmpif '1',hwr + jmpif '2',dowr + jmpif 01BH,first + jp setwr +; +dowr: + uprint wrinst +dow0: + sprint wr0 + inone + cp 0AH + jr z,dow1 + cp 01BH + jp z,setwr + cp 0DH + jr nz,dow0 +;got cr so do it set yes + ld a,0FFH ;set it on + ld (cbios+034H),a + ld a,0 + ld (change),a + jp setwr +dow1: + sprint wr1 + inone + cp lf + jr z,dow2 + cp 01BH + jr z,setwr + cp cr + jr nz,dow1 +;have choice set = 0 + ld a,0 + ld (cbios+034H),a + ld (change),a + jp setwr +dow2: + sprint wr2 + inone + cp 01BH + jp z,setwr + cp lf + jp nz,dow2 + jp dow0 +; +; +hwr: + uprint safmsg + uprint crtocont + input + jp setwr +; +wrinst: + defb 01AH,cr,lf + defb cr,lf,cr,lf + defb 'Yes I want Write Safe enabeled.',cr,lf + defb cr,lf + defb 'No do not enable Write Safe. This is the default mode on your KAYPRO II .',cr,lf + defb cr,lf + defb 'Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf,cr,lf + defb 'Use the [LINE FEED] key to move the cursor to the mode',cr,lf + defb 'which you wish to use and then type the [RETURN] key to',cr,lf + defb 'enter your choice.',cr,lf + defb cr,lf + defb '**** PLEASE read the help file before you enable Write Safe. ****',cr,lf + defb '**** If you do not understand it ASK your dealer. ****',cr,lf + defb '$' +; +wr0: defb 01BH,'=',3+20H,20H,0FFH +wr1: defb 01BH,'=',5+20H,20H,0FFH +wr2: defb 01BH,'=',7+20H,11+20H,0FFH +; +setio: + uprint menuheader + uprint menu1 + input ;get response + push af + uprint crlf + pop af + jmpif '1',hio + jmpif '2',doio + jmpif 01BH,first + jp setio +; +doio: + uprint ioinst + ld hl,cbios+033H + ld (puthere),hl + ld hl,setio + ld (gohere),hl +doio0: + ld a,0 + ld (curline),a + sprint io0 + call inio + sprint io1 + call inio +doioc: sprint io2 + call inio + sprint io3 + call inio +doioe: sprint io4 +doio1: + inone + cp 01BH + jp z,setio + cp 0AH + jr nz,doio1 + jp doio0 +; +inio: + inone ;get a char + cp 01BH + jr nz,inio1 + pop hl + ld hl,(gohere) + jp (hl) +inio1: + cp 0AH + jr nz,inio2 +;have line feed so bump cur line before returning + ld a,(curline) + inc a + ld (curline),a + ret +inio2: + cp 0DH + jr nz,inio +; must have a cr now process it + ld a,0 + ld (change),a ;yes some changes + ld a,(curline) + add a,a + ld de,0 + ld e,a + ld hl,ivtab + add hl,de ;hl now points to 1 of 4 + ld e,(hl) + inc hl + ld d,(hl) + ex de,hl + ld de,(puthere) ;where it goes + jp (hl) +ivtab: defw sio0 + defw sio1 + defw sio2 + defw sio3 +sio0: + ld a,(de) + res 1,a + set 0,a + ld (de),a + ld hl,doioc + ld a,2 + ld (curline),a + pop de + jp (hl) +sio1: + ld a,(de) + res 0,a + res 1,a + ld (de),a + ld a,(curline) + inc a + ld (curline),a + ret +sio2: + ld a,(de) + res 6,a + set 7,a + ld (de),a + ld hl,doioe + jp (hl) +sio3: + ld a,(de) + res 7,a + res 6,a + ld (de),a + ret +; +; +hio: + uprint iomsg + uprint crtocont + input + jp setio +; +; +ioinst: + defb 01AH + defb cr,lf,cr,lf + defb ' Default settings Posibile changes',cr,lf + defb ' ---------------- ----------------',cr,lf + defb cr,lf + defb ' CON:=CRT: CON:=TTY: Type the [LINE FEED] key to ',cr,lf + defb ' LST:=LPT: LST:=TTY: move the cursor to the mode ',cr,lf + defb ' PUN:=TTY: - none - you wish to select.',cr,lf + defb ' RDR:=TTY: - none - Then the RETURN key to enter',cr,lf + defb ' your selection.' + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb '* CON: If you chose CON:=TTY: then all input and output will be through the',cr,lf + defb ' serial connector on the back of your KAYPRO II instead of through the',cr,lf + defb ' keyboard and the CRT.',cr,lf + defb cr,lf + defb cr,lf + defb '* LST: This setting will decide wether the output directed at a printer',cr,lf + defb ' will go through the LPT: (parallel connector) or to the',cr,lf + defb ' TTY: (serial connector).',cr,lf + defb '$' +; +io0: defb 01BH,'=',5+20H,12+20H,0FFH +io1: defb 01BH,'=',5+20H,36+20H,0FFH +io2: defb 01BH,'=',6+20H,12+20H,0FFH +io3: defb 01BH,'=',6+20H,36+20H,0FFH +io4: defb 01BH,'=',10+20H,19+20H,0FFH +; +go$out: ;here to exit check if any changes so as to + ;know wether to write to disk or not + ld a,(change) + cp 0FFH ;0FFH=nochanges + jp nz,askout +bye: + ld a,0 + ld (0FA34H),a ;reset write safe off + jp z,0 ;exit with no changes +; +; +askout: + uprint ask + input ;get response + res 5,a ;make upper case + cp 'N' + jp z,bye ;exit + cp 'Y' + jr nz,askout +; +; now to write the changes to the disk +procede: ;get on with it +;reset the disk system for drive B + ld a,0FFH + ld (0FA34H),a ;set the write safe flag + ld c,14 ;select disk + ld a,(disk) ;find out which disk to use + ld e,a + call 5 ;tell bdos +; +;set up initial paramaters + ld hl,cbios + ld (from),hl ;where to start writing from +; + ld bc,0001H + ld (track),bc ;track we will be using +; + ld bc,21 + ld (sector),bc ;first sector to write to +; + ld a,4 + ld (count),a ;how many sectors to write +; + ld hl,080H + ld (secsize),hl ;sector size +; +;now to do the writing on the disk +nextsec: + ld bc,(track) + call 0FA1EH ;set the track required +; + ld bc,(from) + call 0FA24H ;set the dma address +; + ld bc,(sector) + call 0FA21H ;set the sector to write +; + ld c,0 + call 0FA2AH ;write the sector +; check for error's on return + cp 0 ;a=0=no errors + jr z,go$on + uprint erms ;error message + uprint crtocont + input ;pause for any key to continue + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +go$on: + ld hl,(from) ;dma address + ld de,(secsize) + add hl,de ;bump dma address + ld (from),hl ;save it for reuse + ld a,(sector) + inc a ;bump sector number + ld (sector),a ;save for next write + ld a,(count) ;are we + dec a ;done yet + ld (count),a ;save in case we are not done + cp 0 + jp nz,nextsec ;not yet finished +; + uprint alldone + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +change: defb 0 +disk: defb 0 +from: defw 0 +puthere: + defw 0 +track: defw 0 +sector: defw 0 +count: defb 0 +gohere: defw 0 +secsize: + defw 0 +crlf: defb cr,lf,'$' +alldone: + defb cr,lf,'DONE WITH CONFIGURATION',cr,lf,'$' +crtocont: + defb cr,lf,'Please type any key to continue','$' +erms: + defb cr,lf,'*** I can''t write to your disk ***',cr,lf,'$' +menuheader: + defb 01AH,cr,lf,cr,lf + defb 'KAYPRO II CONFIGURATION PROGRAM 11 July 1982' +; +choices: + defb cr,lf + defb '-----------------------------------------------' + defb cr,lf,cr,lf + defb 'CHOICES' + defb cr,lf + defb '-------' + defb cr,lf,cr,lf + defb '$' +menu0: ;first level menu + defb '1 --------> I/O Byte cold boot defaults' + defb cr,lf + defb '2 --------> Write Safe flag' + defb cr,lf + defb '3 --------> Cursor Keys definitions' + defb cr,lf + defb '4 --------> Numerical keypad definitions' + defb cr,lf + defb '5 --------> Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> EXIT this program and return to CP/M' + defb cr,lf + defb cr,lf + defb '(* NOTE: Anything not changed will contain its default value. *)' + defb cr,lf + defb cr,lf + defb 'Any changes that this program can make will only affect the disk in drive B.' + defb cr,lf + defb 'These changes will not be seen until you move the disk to drive A and' + defb cr,lf + defb 'push the RESET switch (Cold Boot) or turn the power off and on,' + defb cr,lf + defb 'EXCEPT selection ''5'' (Baud rate) which will have an immediate effect.' + defb cr,lf + defb 'Upon exiting this program you will be asked whether you want to apply' + defb cr,lf + defb 'the changes to the disk in drive B.' + defb cr,lf + defb 'Please enter ''1'' or ''2'' or ''3'' or ''4'' or ''5'' or [ESC] key ====>','$' +menu1: ;I/O BYTE menu + defb '1 --------> Help (I/O Byte definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the I/O Byte' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu2: ;write safe flag + defb '1 --------> Help (Write safe flag definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the write safe flag' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf + defb cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu3: ;cursor key + defb '1 --------> Help (Cursor key definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Cursor key settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu4: ;numerical key-pad + defb '1 --------> Help (Numerical keypad definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Numerical keypad settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu5: ;baud rate + defb '1 --------> Help (Baud rate definitions)' + defb cr,lf,cr,lf + defb '2 --------> Change the Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +ask: + defb cr,lf + defb 'Y----------> procede to update the disk in drive B' + defb cr,lf + defb 'N----------> not ready, EXIT TO CP/M' + defb cr,lf + defb cr,lf + defb 'Please type (Y) or (N) ====>' + defb '$' +; +nummsg: + defb 1ah,cr,lf + defb 'On the right hand side of your KAYPRO II keyboard there is a group of',cr,lf + defb 'fourteen keys, labeled: 7 8 9 -',cr,lf + defb ' 4 5 6 ,',cr,lf + defb ' 1 2 3 enter',cr,lf + defb ' 0 .',cr,lf + defb cr,lf + defb 'These fourteen keys each produce a unique code when typed.',cr,lf + defb 'In some situations it may be useful to have one or more keys ',cr,lf + defb 'provide a special function, such as in an application',cr,lf + defb 'program requiring choices from a menu.',cr,lf + defb ' This portion of the CONFIGURATION program allows you to set the',cr,lf + defb 'codes which will be produced by these fourteen keys.',cr,lf + defb cr,lf,lf,lf,lf + defb '$' +baudmsg: + defb 1ah,cr,lf + defb 'Your KAYPRO II computer has a serial port with which you may communicate',cr,lf + defb 'with the outside world. This serial port is most often referred to as',cr,lf + defb 'RS-232. In using RS-232 both the computer and the external device',cr,lf + defb 'must be set at the same baud rate (the speed at which data travels)',cr,lf + defb cr,lf + defb ' Your KAYPRO II is capable of the following baud rates:',cr,lf + defb ' 50 -not used very often',cr,lf + defb ' 75 -not used very often',cr,lf + defb ' 110 -used with slower printers',cr,lf + defb ' 134.5 -used with some IBM printers',cr,lf + defb ' 150 -not used very often',cr,lf + defb ' 300 -very common (default on your KAYPRO II on reset)',cr,lf + defb ' 600 -not used very often',cr,lf + defb ' 1200 -used with many printers',cr,lf + defb ' 1800 -not used very often',cr,lf + defb ' 2000 -not used very often',cr,lf + defb ' 2400 -not used very often',cr,lf + defb ' 3600 -not used very often',cr,lf + defb ' 4800 -higher rate for faster printers',cr,lf + defb ' 7200 -not used very often',cr,lf + defb ' 9600 -highest rate normally used',cr,lf + defb '19200 -very high rate (for special purposes)',cr,lf + defb '(* NOTE: the PRESENT baud rate remains in effect until the next RESET *)' + defb '$' +iomsg: defb 1ah,cr,lf + defb 'In order to understand this command you should read the CP/M manual',cr,lf + defb '"AN INTRODUCTION TO CP/M FEATURES AND FACILITIES", the STAT command',cr,lf + defb 'logical and physical devices. The logical CP/M devices are: CON: LST:',cr,lf + defb 'RDR: and PUN:. The physical devices for the KAYPRO computer are:',cr,lf,lf + defb ' CRT: Video and Keyboard',cr,lf + defb ' TTY: Serial port (note the connector must be wired as in the manual)',cr,lf + defb ' LPT: Centronics port',cr,lf + defb ' UL1: This is the same as TTY: above',cr,lf + defb ' PTP: This is the same as TTY: above',cr,lf,lf + defb 'Possible logical to physical assignments are:',cr,lf,lf + defb ' CON: = TTY: or CRT:',cr,lf + defb ' RDR: = TTY:',cr,lf + defb ' PUN: = TTY: or CRT: or LPT: or UL1:',cr,lf,lf + defb 'BEFORE using this option try it with the STAT command in CP/M.',cr,lf + defb cr,lf,'$' +safmsg: defb 1ah, cr, lf + defb 'Your KAYPRO computer comes with a special "Write Safe" option that corrects',cr,lf + defb 'a problem with CP/M when running with SOME application programs. It is not',cr,lf + defb 'possible to make the following description nontechnical. If you do not under-',cr,lf + defb 'stand it, ask your dealer. The wrong setting of the "Write Safe" flag may cause',cr,lf + defb 'the IRREVOCABLE LOSS OF DATA AND OR PROGRAM(S).',cr,lf,lf + defb 'The KAYPRO computer uses deblocking. When a disk write operation is',cr,lf + defb 'immediately followed by a warm boot, the deblocking buffer may not be',cr,lf + defb 'written to the disk. This is not a likely sequence of events. Most programs',cr,lf + defb 'when finished writing to a file, will close it. ALL directory operations force',cr,lf + defb 'the deblock buffer to disk on write. The "Write Safe" flag tells the BIOS',cr,lf + defb 'that ALL disk operations are directory type. This forces the buffer to the',cr,lf + defb 'disk. The price is performance, as "Write Safe" will slow the computer down',cr,lf + defb 'from 2 to 4 times when writing to the disk. "Write Safe" is not a panacea',cr,lf + defb 'for system or program problems. The chance you will need it is rare.',cr,lf,lf + defb cr,lf,'$' +vecmsg: defb 1ah,cr,lf + defb 'It is not possible to make the following discription nontechnical.', cr, lf + defb 'If you do not understand it please ask your dealer.',cr,lf,lf + defb 'Your KAYPRO II computer comes with four arrow keys, they are at the upper right',cr,lf + defb 'of the main keyboard. They are usually referred to as CURSOR keys. They are ',cr,lf + defb 'used in programs such as SELECT to move the cursor. These keys produce codes',cr,lf + defb 'that are recognized by applications programs. The codes that they produce may',cr,lf + defb 'or may not be the codes that an application you supply wants. The codes sent',cr,lf + defb 'by the keyboard are unique, MSB set. The BIOS translates the keyboard codes',cr,lf + defb 'using a table in the BIOS. This option of the configure program allows you',cr,lf + defb 'to change the values in this table and record it on the disk. The memory',cr,lf + defb 'image is not changed until you cold boot (reset).',cr,lf,lf + defb cr,lf,'$' +;here begins the updated cbios which must eventually +;reside and operate at 0FA00H which is 01F80H in the sysgen image +;and is track 1 sectors 21-22-23-24 on the disk +; +cbios: ;label to allow update to find him +;*************************************** + .phase bios ;absolute location of code following + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + +;**************************************** + end config + \ No newline at end of file diff --git a/2006/toledo2/SOURCE/CONFIG.COM b/2006/toledo2/SOURCE/CONFIG.COM new file mode 100644 index 000000000..6645816a8 Binary files /dev/null and b/2006/toledo2/SOURCE/CONFIG.COM differ diff --git a/2006/toledo2/SOURCE/COPY.COM b/2006/toledo2/SOURCE/COPY.COM new file mode 100644 index 000000000..4aa4063a2 Binary files /dev/null and b/2006/toledo2/SOURCE/COPY.COM differ diff --git a/2006/toledo2/SOURCE/CPM64.COM b/2006/toledo2/SOURCE/CPM64.COM new file mode 100644 index 000000000..a5766f288 Binary files /dev/null and b/2006/toledo2/SOURCE/CPM64.COM differ diff --git a/2006/toledo2/SOURCE/DDT.COM b/2006/toledo2/SOURCE/DDT.COM new file mode 100644 index 000000000..83f8603f9 Binary files /dev/null and b/2006/toledo2/SOURCE/DDT.COM differ diff --git a/2006/toledo2/SOURCE/DUMP.COM b/2006/toledo2/SOURCE/DUMP.COM new file mode 100644 index 000000000..03a77c3ca Binary files /dev/null and b/2006/toledo2/SOURCE/DUMP.COM differ diff --git a/2006/toledo2/SOURCE/ED.COM b/2006/toledo2/SOURCE/ED.COM new file mode 100644 index 000000000..a0f0f5410 Binary files /dev/null and b/2006/toledo2/SOURCE/ED.COM differ diff --git a/2006/toledo2/SOURCE/FORMAT.COM b/2006/toledo2/SOURCE/FORMAT.COM new file mode 100644 index 000000000..1ca2f4b16 Binary files /dev/null and b/2006/toledo2/SOURCE/FORMAT.COM differ diff --git a/2006/toledo2/SOURCE/INITDISK.COM b/2006/toledo2/SOURCE/INITDISK.COM new file mode 100644 index 000000000..fbeba1123 Binary files /dev/null and b/2006/toledo2/SOURCE/INITDISK.COM differ diff --git a/2006/toledo2/SOURCE/KBIOS.ASM b/2006/toledo2/SOURCE/KBIOS.ASM new file mode 100644 index 000000000..541f5301a --- /dev/null +++ b/2006/toledo2/SOURCE/KBIOS.ASM @@ -0,0 +1,274 @@ +title KAYPRO CBIOS for CP/M 2.2 +;############################################################### +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 7,1982 [001] ## +;## by jim nickerson +;## changes: ## +;## -allow redefinition of kpd in cbios ## +;## -change to allow test of serial on liststatus## +;## -default ul1: to tty on list ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set +; and 03H ; form table index to vtab + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +;punch: ld a,(iobyte) ; check i/o byte +; and 30H +; ld hl,rom+39H ; serial punch +; jp z,callrom +; ld hl, rom+42H ; serial with cts as busy +; jp callrom +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom +; ld hl, rom+42H ; assume serial with cts as busy + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + + end + \ No newline at end of file diff --git a/2006/toledo2/SOURCE/KPRS2.ASM b/2006/toledo2/SOURCE/KPRS2.ASM new file mode 100644 index 000000000..d7a60f9f0 --- /dev/null +++ b/2006/toledo2/SOURCE/KPRS2.ASM @@ -0,0 +1,1675 @@ +title KAYPRO RESIDENT SOFTWARE PACKAGE 2.0 , Copyright (C) 1982 NLS, Inc. +subttl Cold start and configure + aseg + ORG 0 +.comment % +######################################################## +## ## +## Cold start routine, reset and configure ## +## system for power up condition. ## +## ## +## Copyright (C) 1982 By Non-Linear Systems, Inc ## +## No warranty is made, expressed or implied. ## +## ## +######################################################## +## Last update: july 13/1982 [001] ## +## by JIM NICKERSON ## +## change list out with busy jump to ## +## to check status of serial port ## +######################################################## +% + .xlist +; extrn stack, diskinit, vidinit, devinit, print, dmaadr, dpha +; extrn home, seldsk, settrk, setsec, setdma, read, write +; extrn sectran, kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; extrn liststat, list, vidout, diskoff, diskon, thnsd + .list + .z80 + +; ROM master jump table + +jp start ; start up computer +jp diskinit ; disk initialize +jp vidinit ; video initialize +jp devinit ; device initialize + +jp home ; home selected disk drive +jp seldsk ; select a disk drive +jp settrk ; seek a track +jp setsec ; set sector number to read +jp setdma ; set dma address +jp read ; read logical sector +jp write ; write logical sector +jp sectran ; xlate sector number +jp diskon ; turn on disk +jp diskoff ; turn off disk + +jp kbdstat ; KeyBoarD character ready +jp kbdin ; input from keyboard +jp kbdout ; output to keyboard (used to ring bell) +jp ttystat ; status of serial input port +jp ttyin ; serial input +jp ttyout ; serial output +jp liststat ; list output status (Centronics) +jp list ; list output +JP TTYOSTAT ;TESTSTATUS OF SERIAL OUTPUT +jp vidout ; video output +jp thnsd ; short delay + +start: di ; stop interupts while setup + ld sp,stack ; rom stack point + ld b,10 ; a delay to let the hardware stabilize + call thnsd + call devinit ; init device sub-system + call vidinit ; init video sub-system + call diskinit ; init disk sub-system + jr bootsys ; boot system + org 66H ; nmi vector + ret ; return from "halt", NMI sequence when in rom +page +; boot system, the first sector (1) of the first track (0) +; hold system boot information. It does NOT hold a short boot routine! +; the image is: +; self: jr self ; hang if booted and run +; defw loadpt ; where to load the opsys image +; defw bios ; where to go after booting system +; defw length ; length of image in 128 byte sectors +; (* the rest of the sector is not used *) +; +; This sector image is loaded and inspected at 0FA00H during the boot process + +crlf equ 0D0AH ; new line codes +esc equ 1BH ; ascii esc +bell equ 07H ; kbd bell + +bootsys:call print + defb esc,'=',20H+10,20H+31 + DEFB '* KAYPRO II *' + defb esc,'=',20H+13,20H+20 + defb 'Please insert your diskette into Drive A',8,0 + ld c,0 + call seldsk ; select disk, set density, do home after diskinit + ld bc,0 ; set track + call settrk + ld c,0 ; read the first sector + call setsec + ld bc,0FA00H ; header sector to go here + call setdma + call read ; read sector to FA00 + di ; read does EI upon exit + or a ; trouble reading? + jr nz,booterr ; tell crt + ld bc,(0FA02H) ; where to load system image + ld (dmaadr),bc + ld bc,(0FA04H) ; where to go after loading system + push bc ; save for latter use + ld bc,(0FA06H) ; length of system in 128 byte sectors + ld b,c ; reg B holds # of sectors to load + ld c,1 ; initial sector (0 was header sector) +cb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + di ; read does EI upon exit + pop bc + or a + jr nz,booterr ; bad read of sector + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + ret z ; done booting goto system + inc c ; bump sector count + ld a,40 ; over sectors/track? + cp c + jr nz,cb1 ; fetch another sector + ld c,16 ; first sector to read on next track + push bc ; save counts + ld bc,1 ; set for next track + call settrk + pop bc + jr cb1 + +booterr:call print + defw crlf, crlf + defb bell,'I cannot read your diskette.',0 + call diskoff ; turn off disk drive +self: jr self ; hang till user pushes reset + +page +subttl Disk Equate and Parameters +.comment % +############################################################### +## ## +## Disk support routines (Deblocking) ## +## ## +############################################################### +## Last Update:06/08/82 [001] ## +############################################################### +% +.z80 + .xlist +; extrn sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; extrn sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; extrn unasec, erflag, rsflag, readop, wrtype, dmaadr +; extrn hstbuf, dsk, denflag, tracka, trackb, dirbuf +; extrn csva, alva, csvb, alvb, dpha, dphb, dpbs, dpbd, tbl1 +; extrn move, rd128, rd512, wrt128, wrt512 +; +; public home, seldsk, settrk, setsec, setdma, read, write, sectran +; public diskinit, diskon, diskoff, thnsd + .list + +bitport equ 01CH ; bit port (m80 does not support extrn bytes) +drvmask equ 0FCH ; drive select mask +denmask equ 0DFH ; density bit mask +ddbit equ 00H ; double density bit +sdbit equ 20H ; single density bit +control equ 10H ; I/O port of disk controller +status equ control+0 ; status register +cmnd equ control+0 ; command register +track equ control+1 ; track register +sector equ control+2 ; sector register +data equ control+3 ; data register +ficmd equ 11010000B ; force interrupt (Abort current command) +rdcmd equ 10000000B ; read command +wrtcmd equ 10100000B ; write command +seekcmd equ 00010000B ; seek command +rstcmd equ 00000000B ; home (restore) command +adrcmd equ 11000000B ; read track address +rdmask equ 10011100B ; read status mask +wrtmask equ 11111100B ; write status mask +tries1 equ 4 ; re-home on bad sector # of tries+1 +tries2 equ 15 ; re-read/write # of retries+1 +retcod equ 0C9H ; return op code +nmivec equ 0066H ; non-maskable interupt vector (used in rd/wt loop) +page +; This section defines the disk parameters (dph's are images moved to RAM) +dph0: defw 0,0,0,0 ; dph for unit A: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csva, alva ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + + defw 0,0,0,0 ; dph for unit B: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csvb, alvb ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + +;dpbs: ;( single density ); + defw 18 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 82 ; (dsm) max logical block # + defw 31 ; (drm) max directory # + defb 80H ; (al0) directory allocation map + defb 00H ; (al1) + defw 8 ; (cks) size of directory check vector + defw 3 ; (off) reserved tracks +;dpbd: ;( double density ); + defw 40 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 194 ; (dsm) max logical block # + defw 63 ; (drm) max directory # + defb 0F0H ; (al0) directory allocation map & BIOS space + defb 00H ; (al1) + defw 16 ; (cks) size of directory check vector + defw 1 ; (off) reserved tracks + +; sector interleave table ( single density ) +;tbl1: + defb 1,6,11,16 + defb 3,8,13,18 + defb 5,10,15,2 + defb 7,12,17,4 + defb 9,14 +enddph: +subttl Logical BIOS entry points & Deblocking +page +.8080 +;***************************************************** +;* Logical BIOS entry points * +;* Sector Deblocking Algorithms * +;***************************************************** +blksiz equ 1024 ;CP/M allocation size +hstsiz equ 512 ;host disk sector size +hstspt equ 10 ;host disk sectors/trk +hstblk equ hstsiz/128 ;CP/M sects/host buff +cpmspt equ hstblk * hstspt ;CP/M sectors/track +secmsk equ hstblk-1 ;sector mask +secshf equ 2 ;log2(hstblk) sector mask +wrall equ 0 ;write to allocated +wrdir equ 1 ;write to directory +wrual equ 2 ;write to unallocated + +single macro lbl + lda denflag + ora a + jnz lbl + endm + +diskinit: ;enter here on system boot to initialize +.z80 + ld hl,ioimage ;move rd/wrt routines into RAM + ld de,move + ld bc,imaglen + ldir + ld hl,dph0 ; set dph's + ld de,dpha + ld bc,enddph-dph0 + ldir +.8080 + xra a ;0 to accumulator + sta hstact ;host buffer inactive + sta unacnt ;clear unalloc count + mvi a,ddbit ;set double density flag + sta denflag + mvi a,255 ;set track numbers to 255 + sta dsk ;clear disk number + sta tracka + sta trackb + ret + +seldsk: ;select disk + mov a,c ;selected disk number + sta sekdsk ;seek disk number + jmp dsksel ;physical disk select (If needed to check den) + +setsec: ;set sector given by register c + mov a,c + sta seksec ;sector to seek + single secset + ret + +.z80 +setdma: ld (dmaadr),bc ;set dma address given by BC + ret + +settrk: ld (sektrk),bc ;set track given by registers BC +.8080 + single trkset + ret + +home: single dohome ; if single goto dohome + lda hstwrt ; patch by DRI + ora a + jnz homed + sta hstact +homed: jmp dohome ; go do home disk drive + +read: ;read the selected CP/M sector + single rd128 ;128 byte sector? + xra a ; a patch by DRI + sta unacnt + mvi a,1 + sta readop ;read operation + sta rsflag ;must read data + mvi a,wrual + sta wrtype ;treat as unalloc + jmp rwoper ;to perform the read + +write: ;write the selected CP/M sector + single wrt128 ;128 byte sector? + xra a ;0 to accumulator + sta readop ;not a read operation + mov a,c ;write type in c + sta wrtype + cpi wrual ;write unallocated? + jnz chkuna ;check for unalloc + +; write to unallocated, set parameters + mvi a,blksiz/128 ;next unalloc recs + sta unacnt + lda sekdsk ;disk to seek + sta unadsk ;unadsk = sekdsk + lhld sektrk + shld unatrk ;unatrk = sectrk + lda seksec + sta unasec ;unasec = seksec + +chkuna: + ;check for write to unallocated sector + lda unacnt ;any unalloc remain? + ora a + jz alloc ;skip if not + +; more unallocated records remain + dcr a ;unacnt = unacnt-1 + sta unacnt + lda sekdsk ;same disk? + lxi h,unadsk + cmp m ;sekdsk = unadsk? + jnz alloc ;skip if not + +; disks are the same + lxi h,unatrk + call sektrkcmp ;sektrk = unatrk? + jnz alloc ;skip if not + +; tracks are the same + lda seksec ;same sector? + lxi h,unasec + cmp m ;seksec = unasec? + jnz alloc ;skip if not + +; match, move to next sector for future ref + inr m ;unasec = unasec+1 + mov a,m ;end of track? + cpi cpmspt ;count CP/M sectors + jc noovf ;skip if no overflow + +; overflow to next track + mvi m,0 ;unasec = 0 + lhld unatrk + inx h + shld unatrk ;unatrk = unatrk+1 + +noovf: + ;match found, mark as unnecessary read + xra a ;0 to accumulator + sta rsflag ;rsflag = 0 + jmp rwoper ;to perform the write + +alloc: + ;not an unallocated record, requires pre-read + xra a ;0 to accum + sta unacnt ;unacnt = 0 + inr a ;1 to accum + sta rsflag ;rsflag = 1 + +;* Common code for READ and WRITE follows *; + +rwoper: + ;enter here to perform the read/write + xra a ;zero to accum + sta erflag ;no errors (yet) + lda seksec ;compute host sector + ora a ;carry = 0 + rar ;shift right + ora a ;carry = 0 + rar ;shift right + sta sekhst ;host sector to seek + +; active host sector? + lxi h,hstact ;host active flag + mov a,m + mvi m,1 ;always becomes 1 + ora a ;was it already? + jz filhst ;fill host if not + +; host buffer active, same as seek buffer? + lda sekdsk + lxi h,hstdsk ;same disk? + cmp m ;sekdsk = hstdsk? + jnz nomatch + +; same disk, same track? + lxi h,hsttrk + call sektrkcmp ;sektrk = hsttrk? + jnz nomatch + +; same disk, same track, same buffer? + lda sekhst + lxi h,hstsec ;sekhst = hstsec? + cmp m + jz match ;skip if match + +nomatch: + ;proper disk, but not correct sector + lda hstwrt ;host written? + ora a + cnz writehst ;clear host buff + +filhst: + ;may have to fill the host buffer + lda sekdsk + sta hstdsk + lhld sektrk + shld hsttrk + lda sekhst + sta hstsec + lda rsflag ;need to read? + ora a + cnz readhst ;yes, if 1 + xra a ;0 to accum + sta hstwrt ;no pending write + +match: + ;copy data to or from buffer + lda seksec ;mask buffer number + ani secmsk ;least signif bits + mov l,a ;ready to shift + mvi h,0 ;double count + dad h ;shift left 7 + dad h + dad h + dad h + dad h + dad h + dad h +; hl has relative host buffer address +.z80 + ld de,hstbuf + add hl,de ;hl = host address + ld de,(dmaadr) ;de = dma address + ld bc,128 ;length + ld a,(readop) ;which way? + or a + jr nz,rwmove ;skip if read + +; write operation, mark and switch direction + ld a,1 + ld (hstwrt),a ;hstwrt = 1 + ex de,hl ;source/dest swap + +rwmove: call move ;move a logical sector to/from buffer + +.8080 +; data has been moved to/from host buffer + lda wrtype ;write type + cpi wrdir ;to directory? + lda erflag ;in case of errors + rnz ;no further processing + +; clear host buffer for directory write + ora a ;errors? + rnz ;skip if so + xra a ;0 to accum + sta hstwrt ;buffer written + call writehst + lda erflag + ret + +;* Utility subroutine for 16-bit compare *; + +sektrkcmp: ;HL = .unatrk or .hsttrk, compare with sektrk +; .z80 +; ld bc,(sektrk) +; or a ; clear carry +; sbc hl,bc ; hl=hl-bc +; ret ; return status + xchg + lxi h,sektrk + ldax d ;low byte compare + cmp m ;same? + rnz ;return if not +; low bytes equal, test high 1s + inx d + inx h + ldax d + cmp m ;sets flags + ret +subttl Physical disk routines +page +.z80 +; select disk drive, C=drive number 0=A:, 1=B: +; return HL=dph for selected drive, or HL=0 for non-existent drive +dsksel: ld hl,0 ; hl = 0 for non-existent drive + ld a,c + cp 2 + ret nc ; drive number >B: + or a ; zero flag set => A: drive else B: drive + ld hl,dpha ; select proper dph for drive + jr z,sel0 + ld hl,dphb +sel0: ld a,(dsk) ; selecting disk already selected? + cp c + ret z ; yes, no further action needed + ld a,c ; save new disk number + ld (dsk),a + or a ; set zero flag if A: drive + push hl ; hl=dph of disk to be selected + ld de,16 ; to density bit in dph + add hl,de + ld a,(hl) ; move into A then store into denflag + ld (denflag),a + ld hl,trackb ;now find proper track(x) + jr z,sel1 + dec hl +sel1: ld a,(hl) ; have we been on the disk we are "leaving" + cp 255 ; if not do not update trackx + jr z,selnot + in a,(track) + ld (hl),a ; save track of disk we are leaving +selnot: ld a,c ; set zero flag if A: drive + or a + ld hl,tracka + jr z,sel2 + inc hl +sel2: ld a,(hl) + out (track),a ; track of disk we are selecting + ex de,hl + pop hl ; address of dph for disk we are selecting +density:cp 255 ; first time for this drive? + ret nz ; need to check density? + call ready ; physical disk select + call home ; seek track 0 + in a,(bitport) ; test double density first + and denmask ; or in density flag + or ddbit ; set density flag + out (bitport),a + call dcheck ; see if we can read address + jr z,dend ; density is double? + in a,(bitport) ; set density flag to single + and denmask + or sdbit + out (bitport),a + call dcheck ; see if we can read address + ret nz ; can't read single or double so don't change + jr dens +dend: push hl ; (* double density *) hl^ to dph + push de + ld de,0 ; no xlate table (done by FORMAT program) + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbd ; double density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,ddbit ; double density bit flag + ld (hl),a + ld (denflag),a + jr den1 ; exit +dens: push hl ; (* single density *) hl^ to dph + push de + ld de,tbl1 ; single density sector xlate table + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbs ; single density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,sdbit ; single density bit flag + ld (hl),a + ld (denflag),a +den1: pop de ; restore pointer to dph + pop hl ; pointer to track(x) bios register + in a,(sector) ; update track register + out (track),a + ld (de),a + ret +dcheck: ld a,adrcmd ; get address command + out (cmnd),a ; issue command to controller + call busy ; wait for command done + bit 4,a ; record not found flag + ret ; return status + +; home disk head +dohome: call ready ; make sure drive is on and ready + ld a,rstcmd; restore command + out (cmnd),a; issue command + jr busy ; test and wait for not busy + +; seek track #, BC=Track # +trkset: call ready ; make sure drive is on and ready + ld a,c ; move track number to A + out (data),a ; track # to seek to + ld a,seekcmd ; seek command + out (cmnd),a ; issue command + jr busy ; test and wait for not busy + +; select sector #, BC=Sector # +secset: ld a,c ; move sector number to A + out (sector),a ; to controller register + ret + +; perform logical to physical sector translation. +; logical sector number in BC, table address in DE +; return physical sector number in HL +sectran:ld a,d ; table address 0? + or e + ld h,b ; if so no xlate + ld l,c + ret z + ex de,hl ; table address in hl + add hl,bc ; index by logical sector number + ld l,(hl) + ld h,0 + ret + +; ready disk drive, perform physical disk select, set density bit +ready: push hl ; save hl + push de ; and de + push bc + ld a,ficmd ; abort any controller action + out (cmnd),a + call diskon ; turn drive motor on + ld a,(dsk) ; A=drive # + ld e,a ; save drive # in E + in a,(bitport) ; A=bit port + and 0FCH ; strip current drive bits + or e ; or in requested drive + inc a ; bump, 01=A: 10=B: + and denmask ; set density bit + ld hl,denflag ; hl^ to density bit for this drive + or (hl) + out (bitport),a ; to bit port + pop bc + pop de + pop hl + ret + +; turn disk motor on, delay for drive speed +diskon: in a,(bitport) ; get current drive motor status + bit 6,a ; is motor on? + ret z ; motor on, do nothing + res 6,a ; motor on bit + out (bitport),a ; turn motor on + ld b,50 ; delay + call thnsd + ret + +; turn disk motor off +diskoff:in a,(bitport) + set 6,a ; motor off bit + out (bitport),a + ret +; delay for B th's @ 4Mhz +thnsd: ld de,1670 +tlp: dec de + ld a,d + or e + jp nz,tlp + djnz thnsd + ret + +; check status of controller, wait for command to finish executing +busy: halt ; wait for command done +bsy: in a,(status) ; now wait for not busy + bit 0,a + jr nz,bsy + ret +subttl Writehst and Readhst logical to Physical routines +page +;* WRITEHST performs the physical write to *; +;* the host disk, READHST reads the physical *; +;* disk. *; + +writehst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. write "hstsiz" bytes + ;from hstbuf and return error flag in erflag. + ;return erflag non-zero if error + ld de,tries1*256+tries2 ; retry error counts +wrthst: push de ; save error counts + call hstcom ; set track and sector + call wrt512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,wrthst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr wrthst + +readhst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. read "hstsiz" bytes + ;into hstbuf and return error flag in erflag. + ld de,tries1*256+tries2 ; retry error counts +rdhst: push de ; save error counts + call hstcom ; set track and sector + call rd512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,rdhst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr rdhst + +hstcom: ld a,(hstdsk) ; select disk + ld c,a + call dsksel + ld bc,(hsttrk) ; set track to hsttrk + call trkset ; physical seek + ld a,(hstsec) ; set physical sector + ld c,a ; c=sector + call secset + ret +subttl Physical disk I/O, RAM image +page +ioimage: +;move: ; block memory move, turn rom on/off + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + ldir ; move logical sector from hstbuf + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ret ; back to rom + +;rd128: + ld hl,(dmaadr) ; address of operation + ld b,1 ; read a 128 byte sector + jr rd +;rd512: + ld hl,hstbuf + ld b,4 ; read a 512 byte sector +; read a sector, return A=0 for no errors, A=1 for non-recoverable error +; if b=1 128, b=2 256, b=3 384, b=4 512 bytes/sector +rd: ld de,rdmask*256+rdcmd ; d=read status mask, e=read command + jr action + +;wrt128: + ld hl,(dmaadr) + ld b,1 ; write a 128 byte sector + jr wrt +;wrt512: + ld hl,hstbuf + ld b,4 ; write a 512 byte sector +; write a sector, return as per read +wrt: ld de,wrtmask*256+wrtcmd ; d=status mask, e=write command + ;fall through to action + +action: call ready ; make sure drive is on and ready + di ; no interrupts during disk I/O operations + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + push hl ; save address of disk buffer + ld hl,nmivec ; set up nmi vector + ld a,(hl) ; save current contents + ex af,af' + ld (hl),retcod ; this is a return after HALT in loop + pop hl ; hl = dma address + ld a,b ; sector multiple + ld bc,128*256+data ; b=sector length, c=data port + bit 0,a ; if 0 then 256 or 512 bytes/sector + jr nz,actn ; b set for 128 or 384 bytes/sector + ld b,0 ; b set for 256 or 512 bytes/sector +actn: cp 1 ; compute entry point 1st or 2nd loop + push psw ; save as Z flag + ld a,e ; i/o command + cp wrtcmd ; a write? + jr z,wstart ; start write command + + out (cmnd),a ; fall through to read loop + pop psw + jr z,rl2 +rl1: halt ; wait for controller + ini + jr nz,rl1 +rl2: halt + ini + jr nz,rl2 + jr done ; read loop done, exit + +wstart: out (cmnd),a ; write loop + pop psw + jr z,wl2 +wl1: halt + outi + jr nz,wl1 +wl2: halt + outi + jr nz,wl2 + +done: ex af,af' ; byte at nmi vector address + ld (nmivec),a ; restore it + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ei ; turn interrupts on + call busy ; get status when contoller not busy + and d ; status mask + ret z ; no bit set, return operation ok + ld a,1 ; cp/m error return + ret + +imaglen equ $-ioimage ; length of this image +page +subttl SIO, PIO, and CTC equates +.comment % +############################################################### +## ## +## System device I/O routines for KBD, TTY and LST ## +## ## +############################################################### +## LAST UPDATE: JULY 7,1982 [001] ## +## BY JIM NICKERSON ## +## CHANGED SIOA REGISTER 3 INIT TO AUTO ENABLE ## +## ADDED LIST STATUS FOR THE SERIAL PORT ## +## TTYOUT NOW THE SAME AS OUT WITH STATUS CHK ## +## CHANGE VECTOR PAD MAPING ## +############################################################### +% +.z80 +.xlist +; public kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; public liststat, list, devinit + .list + +;*************** +;* sio equates * +;*************** + +sio equ 04H ; base address of sio +sioa0 equ sio+2 ; channel a command/status +sioa1 equ sio+0 ; channel a data +siob0 equ sio+3 ; channel b command/status +siob1 equ sio+1 ; channel b data + +; write registers 0-7 and control bits +; init registers in the following order 0,2,4,3,5,1 + +WR0 equ 0 ; command register, crc reset, reg pointer +; bits 0-2 are register pointers to WRx and RRx +; bits 3-5 and commands as given bellow +null equ 0 ; null command +extrset equ 10H ; reset ext/status interrupts +reset equ 18H ; channel reset +ienrc equ 20H ; Enable Int on Next Rx Character +rtip equ 21H ; reset transmitter interrupt pending +errset equ 30H ; error reset +retint equ 31H ; return from interrupt + +WR1 equ 1H ; interrupt enable and Wait/Ready modes +esie equ 1H ; external/status interrupt enable +tie equ 2H ; transmitter interrupt enable +tid equ 0 ; transmitter interrupt disable +statav equ 4H ; Status affects vector (z80 mode 2) (see WR2) +; bits 3-4 affect receive interrupt mode +rid equ 0 ; receive interrupts disabled +rifc equ 8H ; receive interrupt on first char only +riep equ 10H ; recv interrupts enabled, parity err Special Recv Cond +rie equ 18H ; same as riep but parity error not Special Recv Cond + +WR2 equ 2 ; interrupt vector address/pointer (chan b only) +; interrupt address (z80 reg I+WR2=interrupt address) +; returned as is if not statav above in wr1 +; if statav then bits 1-3 are modified as bellow: +; 000 ch b transmit buffer empty +; 001 ch b external/status change +; 010 ch b receive char available +; 011 ch b special receive condition (parity error, Rx overrun, +; framing error, end of frame(sdlc) ) +; 1xx ch a (* same vectors as for channel b above *) + +WR3 equ 3 ; receiver logic control and parameters +re equ 1 ; receiver enable +autoe equ 20H ; auto enable (use dcd and cts to enable recv and xmt +; bits 6-7 are receiver bits/character +rbits5 equ 0 ; 5 bits/character +rbits7 equ 40H ; 7 bits/character +rbits6 equ 80H ; 6 bits/character +rbits8 equ 0C0H ; 8 bits/character + +WR4 equ 4 ; control bits that affect both xmt and recv +pon equ 1 ; enable parity (parity on) +pstate equ 2 ; parity even not pstate = parity odd +; bits 2-3 are number of stop bits +syncmd equ 0 ; sync mode is to be selected +sbits1 equ 4 ; 1 stop bit +sbits5 equ 8H ; 1.5 stop bits +sbits2 equ 0CH ; 2 stop bits +; bits 6-7 control clock rate +cr1 equ 0 ; data rate x1=clock rate +cr16 equ 40H ; x16 +cr32 equ 80H ; x32 +cr64 equ 0CH ; x64 + +WR5 equ 5 ; control bits that affect xmt +te equ 8H ; transmit enable +break equ 10H ; send break +; bits 5-6 are number of bits/character to transmit +tbits5 equ 0 ; 5 or less bits/character +tbits7 equ 20H ; 7 bits/character +tbits6 equ 40H ; 6 bits/character +tbits8 equ 60H ; 8 bits/character +rts equ 2 ; RTS output +dtr equ 80H ; DTR output + +WR6 equ 6 ; sdlc transmit sync character +WR7 equ 7 ; sdlc receive sync character + +; read registers 0-2 and status bits +rr0 equ 0 ; general recv and xmt status +rca equ 1 ; receive character available +intped equ 2 ; interrupt pending (ch a only) +tbe equ 4 ; transmit buffer empty +synhnt equ 10H ; sync/hunt +dcd equ 8H ; DCD input +cts equ 20H ; CTS input +xmtundr equ 40H ; transmit underrun/ EOM +brk equ 80H ; break/abort status + +rr1 equ 1 ; Special Receive conditions and Residue codes +; bits 4-7 are special receive conditions +rpe equ 10H ; parity error +rovr equ 20H ; Rx overrun error +framerr equ 40H ; framing error + +rr2 equ 2 ; interrupt vector address/pointer + +;*************** +;* pio equates * +;*************** + +pio equ 08H ; base address of pio +pioac equ pio+1 ; pio a control +pioad equ pio+0 ; pio a data +piobc equ pio+3 ; pio b control +piobd equ pio+2 ; pio b data + +spio equ 01CH ; base address of pio (system status bits port) +spioac equ spio+1 ; pio a control +spioad equ spio+0 ; pio a data +spiobc equ spio+3 ; pio b control +spiobd equ spio+2 ; pio b data + +bitport equ spioad ; system bit port for status and control +;0 drive sel A: +;1 drive sel B: +;2 n/c +;3 centronics i/o ready line +;4 centronics i/o data strobe +;5 single density (not 5 is double density) +;6 drive motor off (not 6 is motor on) +;7 rom enable (not 7 is rom off) + +; control register +setiv equ 0 ; set interrupt vector, bits 1-7 are vector address + +som equ 0FH ; set operating mode. bits 6-7 specify mode +mode0 equ 0 ; output +mode1 equ 40H ; input +mode2 equ 80H ; bidirectional +mode3 equ 0C0H ; control (bit by bit i/o, mode3 command is followed by + ; byte where bit pattern specifies i/o bits + ; 1=input, 0=output + +sicw equ 7H ; set interrupt control word, bits 4-7 are parameters +imask equ 10H ; bit mask follows ) +hghlow equ 20H ; high/low ) mode 3 only +andor equ 40H ; and/or of bits to gen interrupt ) +intena equ 80H ; enable interrupt (bit low disable interrupts) + +intcmd equ 03H ; set interrupt enable/disable without changing status as sicw + +;*************** +;* ctc equates * +;*************** + +ctc equ 18H ; ctc base address +ctc0 equ ctc+0 ; ctc channel 0 +ctc1 equ ctc+1 ; ctc channel 1 +ctc2 equ ctc+2 ; ctc channel 2 +ctc3 equ ctc+3 ; ctc channel 3 + +; channel control register bits +ctccmd equ 01H ; ctc command byte +ctcint equ 80H ; interrupt enable +ctcm1 equ 40H ; set ctc mode is counter +ctcm0 equ 00H ; set ctc mode is timer +range equ 20H ; timer prescaler factor is 256 (not range is 16) +slope equ 10H ; edge triger positive (not slope is negative edge) +trigger equ 8H ; ext trigger +ltc equ 4H ; load time constant (followed by time constant) +rsetctc equ 2H ; reset channel + +ctcivec equ 0 ; set ctc interrupt vector, bits 3-7 are vector addr +ctcvmsk equ 0F8H ; interrupt vector mask to strip bits 0-2 + +;*************** +;* baud rate * +;*************** + +bauda equ 00H ; baud rate generator for serial chan a +baudb equ 0CH ; baud rate generator for serial chan b + +; baud rate factors, output to baudx to select baud rate +baud10 equ 02H ; 110 baud rate +baud30 equ 05H ; 300 baud rate +baud12 equ 07H ; 1200 baud rate +baud24 equ 0AH ; 2400 baud rate +baud48 equ 0CH ; 4800 baud rate +baud96 equ 0EH ; 9600 baud rate +baud19k equ 0FH ; 19.2k baud rate +subttl I/O configuration tables +page +iotabint: ; i/o device initialization table + ; first byte is port # + ; second byte is byte to send to port + defb (iotblend-iotabint)/2 ; table length in arguments + +; init sio channel b +defb siob0, reset ; reset sio channel +defb baudb, baud30 ; 300 baud +defb siob0, wr4 +defb siob0, sbits1 or cr16 ; one stop bit, 16x clock +defb siob0, wr3 +defb siob0, re or rbits8 ; recv enable, 8 bits/char +defb siob0, wr5 +defb siob0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb siob0, wr1 +defb siob0, tid or rid ; xmt & recv interrupts disabled + +; init sio channel a +defb sioa0, reset ; reset sio channel +defb bauda, baud30 ; 300 baud +defb sioa0, wr4 +defb sioa0, sbits1 or cr16 ; one stop bit, 16x clock +defb sioa0, wr3 +defb sioa0, re or rbits8 or autoe ; recv enable, 8 bits/char, auto enable +defb sioa0, wr5 +defb sioa0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb sioa0, wr1 +defb sioa0, tid or rid ; xmt & recv interrupts disabled + +; init pio used form system control bits +defb spioac, intcmd ; disable interrupts +defb spioad, 10000001B ; set system status bits (before setting mode!) +defb spioac, som or mode3 ; set mode to #3 +defb spioac, 00001100B ; bit pattern for mode 3 + +; init pio used to drive printer +defb pioac, intcmd ; disable interrupts +defb pioac, som or mode0 ; set mode to #0 (output) +defb piobc, intcmd ; disable interrupts +defb piobc, som or mode1 ; set mode to #1 (input) +iotblend: ; end of table + +devinit:ld hl,iotabint ; initialize i/o devices + ld b,(hl) ; number of bytes to send to i/o devices +iolp: inc hl + ld c,(hl) ; port to send + inc hl + ld a,(hl) ; byte to send + out (c),a + djnz iolp + ret ; done +subttl Device I/O handlers +page +kbdstat:in a,(siob0) ; kbd char avail? + and rca + ret z ; 0=no char + ld a,0FFH ; FF=char avail + ret + +kbdin: call kbdstat ; loop till char avail + jr z,kbdin + in a,(siob1) ; get char + call kbdmap ; map out funny chars of vector pad and #'s + ret + +kbdout: in a,(siob0) ; xmit buffer empty? + and tbe + jr z,kbdout + ld a,c ; out character + out (siob1),a + ret + +kbdmap: ld hl,mapin ; input map table + ld bc,mapout-mapin ; table length + cpir ; search table + ret nz ; not found + ld de,mapin ; make hl=table index + or a ; hl-mapin=index + sbc hl,de + ld de,mapout-1 ; index + add hl,de + ld a,(hl) ; get char from mapout + ret + +mapin: defb 0F1H, 0F2H, 0F3H, 0F4H ; up, down, left, right arrows + defb 0B1H, 0C0H, 0C1H, 0C2H ; 0,1,2,3 + defb 0D0H, 0D1H, 0D2H, 0E1H ; 4,5,6,7 + defb 0E2H, 0E3H, 0E4H, 0D3H ; 8,9, '-', ',' + defb 0C3H, 0B2H ; return, '.' + defb 0FFH ; end of mapin table +mapout: defb 80H, 81H, 82H, 83H ; vector pad, xlate in bios + defb 84H, 85H, 86H, 87H + defb 88H, 89H, 8AH, 8BH + defb 8CH, 8DH, 8EH, 8FH + defb 90H, 91H + +ttystat:in a,(sioa0) ; serial port status input + and rca + JR COMOUT + +ttyin: call ttystat ; is a char ready? + jr z,ttyin + in a,(sioa1) + ret + +ttyout: in a,(sioa0) ; output a char to serial port + and tbe + jr z,ttyout ; xmit buffer full? + ld a,c + out (sioa1),a ; xmit character + ret + +; +TTYOSTAT: ;TEST STATUS OF SERIAL OUTPUT + IN A,(SIOA0) + AND TBE ;TX BUF FULL ? + JR COMOUT +; +; list port centronics equates +pready equ 3 ; bit in bit port +pstrob equ 4 ; bit in bit port + +liststat:in a,(bitport) ; centronics printer port status + bit pready,a +COMOUT: ret z ; 0=busy + ld a,0FFH ; FF=ready + ret + +list: call liststat ; is printer busy? + jr z,list + ld a,c + out (pioad),a ; output char to printer + in a,(bitport) ; strb. printer + set pstrob,a + out (bitport),a + res pstrob,a + out (bitport),a + ret + +page +subttl Memory maped video output driver +.comment % +################################################################## +## ## +## Memory maped video output driver ## +## ## +################################################################## +## Last Update : july 13 1982 ## +## by jim nickerson ## +################################################################## +% +; +.xlist +; extrn leadflg, row, cursor, chrmsk, kbdout +; public vidout, vidinit, print +.list + +.z80 +jmpif macro j,k ;SHORT JUMP + cp j + JR z,k + endm +; +LJMPIF macro j,k ;LONG JUMP + cp j + jp z,k + endm + + +colcp macro x + ld a,l + and not colum-1 + cp x + endm + +SPACE equ 20H ; space char +cr equ 0DH ; move cursor to beginning of line +bs equ 08H ; move cursor left (control h) +fs equ 0CH ; move cursor right (control l) +lf equ 0AH ; move cursor down (control j) +rlf equ 0BH ; move cursor up (control k) +eol equ 18H ; clear to end of line (control x) +eos equ 17H ; clear to end of screen (control w) +clr equ 1AH ; clear screen char (control z) +homec equ 1EH ; home cursor +esc equ 1BH ; escape, lead-in character +bell equ 07H ; ascii bell +curchr equ '_' or 80H ; character for cursor +ascii equ 7FH ; ascii mask +greek equ 1FH ; greek character set mask + +base equ 03000H ;start of video ram +linlen equ 80 ;logical line length +colum equ 128 ;physical line length +lines equ 24 ;lines per display +line1 equ base ;start of first line +line2 equ base+colum ;start of second line +last1 equ base+(lines-1)*colum ;start of last line +last equ (base+lines*colum)-1 ;last char of display +bitport equ 1CH ;system bit port + +vidinit:ld a,space ; clear row # + ld (row),a + call clear ; clear screen and home cursor + ld (cursor),hl + xor a + ld (leadflg),a ; no leadin sequence + ld a,17H ; re-set scroll register + out (14H),a + ld a,ascii ; set ascii mask + ld (chrmsk),a + ret + +vidout: + ld a,(leadflg) ; processing a lead-in sequence? + or a + jp nz,leadin + ld a,bell ; ring bell, no display? + cp c + JR nz,nobell + ld c,04H ; kbd bell code + jp kbdout ; ring bell + +nobell: call clrcur ; clear (remove) cursor + ld de,finsh ; set up return to finish + push de + ld a,c ; char to print + jmpif lf,lfcd ; line feed (down arrow) + LJMPIF cr,return ; return + jmpif bs,back ; back space (left arrow) + jmpif fs,fowrd ; right arrow + jmpif rlf,up ; up arrow + LJMPIF esc,doesc ; lead-in + LJMPIF eol,cleol ; clear to eol + jmpif eos,cleos ; clear to eos + jmpif clr,clear ; clear screen, home currsor + jmpif homec,hmcsr ; home cursor + cp 60H ; lower case? + jr c,vout + ld a,(chrmsk) ; if lower do we print greek chr set? + and c +vout: ld (hl),a ; display character + inc hl ; inc cursor position + ld a,l ; off end of line? + and not colum + cp linlen ; logical line length + ret c ; not past colum-1 + call return + jr lfcd + +vovr: ld de,last ; off display memory? + ld a,d + cp h + jr c,scroll + ret nz + ld a,e + cp l + ret nc +scroll: ld b,lines-1 ; number of lines to scroll + ld hl,line2 + ld de,line1 +scr1: push bc ; save line count + ld bc,linlen ; logical line length + ldir ; scroll one line + ld bc,colum-linlen ; to beginning of next line + add hl,bc + ex de,hl + add hl,bc + ex de,hl + pop bc ; line count + djnz scr1 ; do another line + ld hl,last1 ; to last line of display + JR cleol ; clear it + +; +; process a line feed (cursor down) +; +lfcd: ld de,colum ; to next line, same column + add hl,de + JR vovr +; +; back space the cursor +; +back: ld a,l ; is column # 0? + and not colum + ret z ; at beginning of line + dec hl ; back space + ret +; +; move cursor foward +; +fowrd: ld a,l ; right most column? + and 07FH ;INSTEAD OF not colum-1 + cp 79 + ret nc + inc hl ; bump cursor address + ret +; +; move cursor up one line +; +up: push hl ; save current position + ld de,-colum ; move up one line + add hl,de + push hl ; save new cursor position + or a ; clear carry + ld de,line1 ; first char of display + sbc hl,de ; if carry set we are off display + pop hl ; hl = new pos + pop de ; de = old pos + ret nc + ex de,hl + ret +; +; clear screen +; +clear: ld hl,line1 ; clear screen + ld de,line1+1 + ld bc,last-base + ld (hl),space + ldir + ld hl,line1 ; home cursor + ret +; +; home cursor +; +hmcsr: ld hl,line1 ; line one of display + ret +; +; clear to end of screen +; +cleos: +; patch by jim + push hl ;save current position + call cleol + ld de,colum + ld a,l + and 080H + ld l,a + add hl,de ;begining of next line + ld a,03CH ;after last line now ? + cp h ;h holds page (3B) is last line + jr z,cleos1 ;yes so no more to blank get out +; + ld e,l ; copy hl to de + ld d,h + or a ; clear carry + ld hl,last ; last pos of screen + sbc hl,de ; last-current position + ld c,l ; move count to bc + ld b,h + ld h,d ; move current position into hl + ld l,e + inc de + ld (hl),space + ldir +; +;patch by jim +cleos1: +; + pop hl ; restore cursor position + ret +; +; clear to end of line +; +cleol: +; +;patch by jim +; + ld a,l + and 07FH + cp linlen-1 + jr c,cleol1 + ld (hl),space + ret +cleol1: +; +; + push hl ; save current position + push hl + ld a,l ; find beginning of line + and not colum-1 + ld l,a +; +;patch by jim + ld de,linlen-1 +; + add hl,de ; hl points to end of line + pop de ; current position in de + push de + or a ; clear carry + sbc hl,de ; hl=# of bytes to clear + ld c,l ; move count into bc + ld b,h + pop hl ; current position + ld e,l ; copy to de + ld d,h + inc de + ld (hl),space + ldir + pop hl ; restore cursor address + ret + +clrcur: ld hl,(cursor) ; get cursor location + ld a,(hl) ; undo cursor + cp curchr ; is it a cursor on a blank field? + ld a,space + jr nz,clr1 + ld (hl),a +clr1: res 7,(hl) ; undo cursor + ret +; +; process a return +; +return: ld a,l + and not colum-1 + ld l,a + ret +; +; escape lead-in sequence start up +; +doesc: ld a,1 ; leadflg is a counter of chars processed + ld (leadflg),a + ret +; +; process second, third and fourth characters of lead-in sequence +; +leadin: ld hl,exit ; fake ret to exit + push hl + ld hl,leadflg + ld (hl),0 ; clear lead-in counter in case error + cp 1 ; second char? (leadflg=1 processed first char) + jr nz,l1 + ld a,c ; what type of esc sequence? + res 7,a + cp 'G' ; greek character set? + jr z,dogreek + cp 'A' ; ascii character set? + jr z,doascii + cp 'R' ; delete line? + jr z,dodel + cp 'E' ; insert line? + jr z,doinst + cp '=' ; esc = sequence (cursor positioning) + ret nz ; error, exit + ld (hl),2 ; have processed second character of sequence + ret +l1: cp 2 ; third character? + jr nz,l2 + ld a,c ; row number+space + ld (row),a ; save for later use + ld (hl),3 ; have processed third character + ret +l2: cp 3 ; fourth character? + ret nz ; error, leadflg trashed by someone + + call clrcur ; remove cursor then move it + pop hl ; ret to exit not needed + ld hl,line1 ; process col # + ld a,c + sub ' ' ; remove ascii space bias +;patch by jim +; +l3: sub linlen +; + jr nc,l3 + add a,linlen + ld l,a + ld a,(row) + sub ' ' ; remove ascii space bias +l4: sub lines ; range 0 - lines + jr nc,l4 + add a,lines + ld de,colum ; add column to cursor pos till +l5: jp z,finsh ; # lines = 0 + add hl,de + dec a + jr l5 +; +FINSH: LD A,(HL) ; MAKE A CURSOR + CP SPACE ; SPACE + JR NZ,FIN1 ; IF SO THEN SPECIAL CURSOR CHAR + LD A,CURCHR +FIN1: SET 7,a + ld (hl),a + ld (cursor),hl ; save location +exit: ret ; all done + +; +; switch from ascii to greek +; +dogreek:ld a,greek ; greek char mask + ld (chrmsk),a + ret +; +; switch from greek to ascii +; +doascii:ld a,ascii ; ascii mask + ld (chrmsk),a + ret +; +; delete line, scroll up to current line, blank 24'th line +; +dodel: pop hl ; ret to exit not needed + call setup ; setup cpu regs for ldir + push de ; current line + jr z,delscr ; if setup set Z flag no scroll + ldir +delscr: ld hl,last1 ; blank last line + call cleol + pop hl ; current line + JR finsh +; +; insert a blank line at current row address, 24'th line lost +; +doinst: pop hl ; ret to exit not needed + call setup + push de ; current line + jr z,inscr ; no scroll + ld de,last1+127 + ld hl,last1-1 + lddr +inscr: pop hl ; current line + push hl + call cleol ; clear it + pop hl ; current row, colum=0 + JR finsh + +setup: call clrcur ; get current cursor position + call return ; to beginning of line + push hl ; save it + ex de,hl ; compute amount to move + ld hl,last1 ; last line of display + or a + sbc hl,de + ld b,h ; bc=length + ld c,l + pop hl ; current pos + push hl + ld de,128 ; set a pointer to beginning of next line + add hl,de ; hl=current+128 (next line) + pop de ; de=current + ld a,b ; is bc zero + or c + ret + +print: ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call vidout + jr print + defb 0FFH ; because L80 tends to drop the last byte + +page +subttl RAM storage +.comment % +############################################################### +## ## +## System scratch RAM used by ROM software ## +## ## +############################################################### +## Last Update:05/31/82 [001] ## +############################################################### +% +.z80 +.xlist +; public sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; public sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; public unasec, erflag, rsflag, readop, wrtype, dmaadr +; public hstbuf, dsk, denflag, tracka, trackb, dirbuf, move +; public csva, alva, csvb, alvb, dpha, dphb, rd128, rd512 +; public leadflg, row, cursor, chrmsk, wrt128, wrt512, stack +; public dpbs, dpbd, tbl1, tbl2 +.list + +ramscratch equ 0FC00H ; scratch ram + +sekdsk equ ramscratch ;seek disk number +sektrk equ sekdsk+1 ;seek track number +seksec equ sektrk+2 ;seek sector number +hstdsk equ seksec+1 ;host disk number +hsttrk equ hstdsk+1 ;host track number +hstsec equ hsttrk+2 ;host sector number +sekhst equ hstsec+1 ;seek shr secshf +hstact equ sekhst+1 ;host active flag +hstwrt equ hstact+1 ;host written flag +unacnt equ hstwrt+1 ;unalloc rec cnt +unadsk equ unacnt+1 ;last unalloc disk +unatrk equ unadsk+1 ;last unalloc track +unasec equ unatrk+2 ;last unalloc sector +erflag equ unasec+1 ;error reporting +rsflag equ erflag+1 ;read sector flag +readop equ rsflag+1 ;1 if read operation +wrtype equ readop+1 ;write operation type +dmaadr equ wrtype+1 ;last dma address +hstbuf equ dmaadr+2 ;host buffer +dsk equ hstbuf+512 ; current disk drive +denflag equ dsk+1 ; density flag for current drive +tracka equ denflag+1 ; track of disk A (255=density unknown) +trackb equ tracka+1 ; track of disk B +csva equ trackb+1 ; directory check +alva equ csva+16 ; allocation map +csvb equ alva+25 +alvb equ csvb+16 +leadflg equ alvb+25 ; video leadin sequence count +row equ leadflg+1 ; temp store of rom number +cursor equ row+1 ; cursor address +chrmsk equ cursor+2 ; ascii/greek character set switch +dpha equ chrmsk+1 ; DPH for A +dphb equ dpha+17 ; DPH for B +dpbs equ dphb+17 ; single density dpb +dpbd equ dpbs+15 ; double density dpb +tbl1 equ dpbd+15 ; single density skew table +tbl2 equ tbl1+18 ; 512 byte sector skew table +move equ tbl2+10 ; move logical sector from hstbuf +rd128 equ move+15 ; routine to read 128 byte sector +rd512 equ rd128+7 ; routine to read 512 byte sector +wrt128 equ rd512+10 ; routine to write 128 byte sector +wrt512 equ wrt128+7 ; routine to wrtie 512 byte sector +rdwrtend equ rd128+150 ; end of read and write routines +dirbuf equ rdwrtend+1 ; bdos directory buffer + +stack equ 0FFFFH ; boot up stack space + end + \ No newline at end of file diff --git a/2006/toledo2/SOURCE/LOAD.COM b/2006/toledo2/SOURCE/LOAD.COM new file mode 100644 index 000000000..b9601e002 Binary files /dev/null and b/2006/toledo2/SOURCE/LOAD.COM differ diff --git a/2006/toledo2/SOURCE/MOVCPM.COM b/2006/toledo2/SOURCE/MOVCPM.COM new file mode 100644 index 000000000..8790cdb56 Binary files /dev/null and b/2006/toledo2/SOURCE/MOVCPM.COM differ diff --git a/2006/toledo2/SOURCE/PIP.COM b/2006/toledo2/SOURCE/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/SOURCE/PIP.COM differ diff --git a/2006/toledo2/SOURCE/SETDISK.COM b/2006/toledo2/SOURCE/SETDISK.COM new file mode 100644 index 000000000..8ea207799 Binary files /dev/null and b/2006/toledo2/SOURCE/SETDISK.COM differ diff --git a/2006/toledo2/SOURCE/STAT.COM b/2006/toledo2/SOURCE/STAT.COM new file mode 100644 index 000000000..1de359f27 Binary files /dev/null and b/2006/toledo2/SOURCE/STAT.COM differ diff --git a/2006/toledo2/SOURCE/SUBMIT.COM b/2006/toledo2/SOURCE/SUBMIT.COM new file mode 100644 index 000000000..400ce2f7f Binary files /dev/null and b/2006/toledo2/SOURCE/SUBMIT.COM differ diff --git a/2006/toledo2/SOURCE/SYSGEN.COM b/2006/toledo2/SOURCE/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/SOURCE/SYSGEN.COM differ diff --git a/2006/toledo2/SOURCE/WASH.COM b/2006/toledo2/SOURCE/WASH.COM new file mode 100644 index 000000000..fa6ee3176 Binary files /dev/null and b/2006/toledo2/SOURCE/WASH.COM differ diff --git a/2006/toledo2/SOURCE/XDIR.COM b/2006/toledo2/SOURCE/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/SOURCE/XDIR.COM differ diff --git a/2006/toledo2/SOURCE/XSUB.COM b/2006/toledo2/SOURCE/XSUB.COM new file mode 100644 index 000000000..15e86abfc Binary files /dev/null and b/2006/toledo2/SOURCE/XSUB.COM differ diff --git a/2006/toledo2/STAT.COM b/2006/toledo2/STAT.COM new file mode 100644 index 000000000..1de359f27 Binary files /dev/null and b/2006/toledo2/STAT.COM differ diff --git a/2006/toledo2/SUBMIT.COM b/2006/toledo2/SUBMIT.COM new file mode 100644 index 000000000..400ce2f7f Binary files /dev/null and b/2006/toledo2/SUBMIT.COM differ diff --git a/2006/toledo2/SYSGEN.COM b/2006/toledo2/SYSGEN.COM new file mode 100644 index 000000000..0098e2c13 Binary files /dev/null and b/2006/toledo2/SYSGEN.COM differ diff --git a/2006/toledo2/THE-WORD/DICTSORT.COM b/2006/toledo2/THE-WORD/DICTSORT.COM new file mode 100644 index 000000000..7a72032e2 Binary files /dev/null and b/2006/toledo2/THE-WORD/DICTSORT.COM differ diff --git a/2006/toledo2/THE-WORD/FIND.COM b/2006/toledo2/THE-WORD/FIND.COM new file mode 100644 index 000000000..7a0a7f683 Binary files /dev/null and b/2006/toledo2/THE-WORD/FIND.COM differ diff --git a/2006/toledo2/THE-WORD/HOMONYMS.TXT b/2006/toledo2/THE-WORD/HOMONYMS.TXT new file mode 100644 index 000000000..3771cf3cf Binary files /dev/null and b/2006/toledo2/THE-WORD/HOMONYMS.TXT differ diff --git a/2006/toledo2/THE-WORD/LOOKUP.COM b/2006/toledo2/THE-WORD/LOOKUP.COM new file mode 100644 index 000000000..7e194c22f Binary files /dev/null and b/2006/toledo2/THE-WORD/LOOKUP.COM differ diff --git a/2006/toledo2/THE-WORD/MAINDICT.CMP b/2006/toledo2/THE-WORD/MAINDICT.CMP new file mode 100644 index 000000000..add4b16f1 Binary files /dev/null and b/2006/toledo2/THE-WORD/MAINDICT.CMP differ diff --git a/2006/toledo2/THE-WORD/MARK.COM b/2006/toledo2/THE-WORD/MARK.COM new file mode 100644 index 000000000..c38ce2690 Binary files /dev/null and b/2006/toledo2/THE-WORD/MARK.COM differ diff --git a/2006/toledo2/THE-WORD/REVIEW.COM b/2006/toledo2/THE-WORD/REVIEW.COM new file mode 100644 index 000000000..d3bff1b07 Binary files /dev/null and b/2006/toledo2/THE-WORD/REVIEW.COM differ diff --git a/2006/toledo2/THE-WORD/SPELL.COM b/2006/toledo2/THE-WORD/SPELL.COM new file mode 100644 index 000000000..bd23fb476 Binary files /dev/null and b/2006/toledo2/THE-WORD/SPELL.COM differ diff --git a/2006/toledo2/THE-WORD/WC.COM b/2006/toledo2/THE-WORD/WC.COM new file mode 100644 index 000000000..46c46aea4 Binary files /dev/null and b/2006/toledo2/THE-WORD/WC.COM differ diff --git a/2006/toledo2/THE-WORD/WORDFREQ.COM b/2006/toledo2/THE-WORD/WORDFREQ.COM new file mode 100644 index 000000000..ebb0174ee Binary files /dev/null and b/2006/toledo2/THE-WORD/WORDFREQ.COM differ diff --git a/2006/toledo2/TINKER/CONFIG.MAC b/2006/toledo2/TINKER/CONFIG.MAC new file mode 100644 index 000000000..4f9eef1db --- /dev/null +++ b/2006/toledo2/TINKER/CONFIG.MAC @@ -0,0 +1,1256 @@ +false equ 0 +true equ not false +debug equ false + .list ;begin listing +title KAYPRO CONFIG (custom configuration utility program) 2.0 Copyright (C) 1982 NLS, Inc. +page +;############################################################### +;## KAYPRO II CONFIG PROGRAM ## +;## containing within it the new cbios image so that ## +;## if this is run against a disk with the old cbios ## +;## it is updated at the same time. ## +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 11,1982 ## +;## by jim nickerson ## +;## -allow redefinition of cursor keys ## +;## -allow redifinition of keypad keys ## +;## -allow redefinition of default i/o byte ## +;## -allow changing of the baud rate ## +;## -write these changes to disk ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + +; +; begining of the config program +; + jp config ;begining of program +; +mprint: + ld a,(de) ;get char + cp 0FFH ;end + ret z ;finished + push de + ld c,2 + ld e,a + call 5 + pop de + inc de + jr mprint +; +sprint macro arg + ld de,arg ;pointer to print line + call mprint + endm +; +; +printone macro + push af ;save char + ld c,2 ;console output + ld e,a ;char + call 5 + pop af ;recover char + endm +; +; +inone macro + local loop +loop: + ld c,6 ;direct console input + ld e,0FFH + call 5 + cp 0 ;0=nochar + jr z,loop ;wait for char + endm +; +; +jmpif macro arg, adr + cp arg + jp z, adr + endm +; +;print a message using bdos call +cr equ 0DH +lf equ 0AH +uprint macro x + ld c,9 + ld de,x ;message pointer + call 5 ;pass it to bdos + endm +; +;get a char from the console, up case +input macro + ld c,1 ;console input + call 5 ;pass it to bdos + endm +; +;*************************************************************** +;*************************************************************** +; +config: ;begining of the config program with main menu +; +;**************************************************************** +;**************************************************************** +; + ld a,1 + ld (disk),a ;force drive B + ld a,0FFH + ld (change),a ;changes flag 0=yes some changes +; +first: + uprint menuheader + uprint menu0 + input ;get an answer + push af ;save char + uprint crlf + pop af + jmpif '1',setio ;menu1 + jmpif '2',setwr ;menu2 + jmpif '3',setcur ;menu3 + jmpif '4',setnum ;menu4 + jmpif '5',setbaud ;menu5 + jmpif 01BH,go$out + jp first +; +setbaud: + uprint menuheader + uprint menu5 + input + push af + uprint crlf + pop af + jmpif '1',hbaud + jmpif 01BH,first + jmpif '2',dobaud + jp setbaud +; +dobaud: + uprint baudinst +dob1: + ld a,0 + ld (curline),a ;which choice + uprint firstchoice +dob2: + inone ;get a key + cp 01BH + jr z,setbaud + cp lf + jp z,db1 + cp cr + jr nz,dob2 + ;was a cr so we have a choice + ld a,(curline) + cp 16 ;wants to exit + jp nc,dob2 + out (0),a ;set baud rate + jp setbaud +; +db1: + ld a,(curline) ;where are we + inc a ;bump pointer + ld (curline),a ;save for future use + cp 17 ;end of choices + jr z,dob1 + uprint nextline ;advance one line + jr dob2 ;next line +curline: defb 0 +baudinst: + defb 1AH + defb ' 50',cr,lf + defb ' 75',cr,lf + defb ' 110 Move the cursor to the baud rate which',cr,lf + defb ' 134.5',cr,lf + defb ' 150 you want to use by typing the [LINE FEED] key.',cr,lf + defb ' 300',cr,lf + defb ' 600',cr,lf + defb ' 1200 When the cursor is at the rate you want',cr,lf + defb ' 1800',cr,lf + defb ' 2000 type the RETURN key and it will be set.',cr,lf + defb ' 2400',cr,lf + defb ' 3600 The new baud rate will be effective now.',cr,lf + defb ' 4800',cr,lf + defb ' 7200',cr,lf + defb ' 9600',cr,lf + defb '19200',cr,lf + defb 'Type [ESC] key to return to the previous menu (no changes)',cr,lf + defb cr,lf,lf + defb '(* NOTE: The baud rate will always default to 300 baud *)',cr,lf + defb '(* after the power is first turned on and when *)',cr,lf + defb '(* the RESET button is pressed. *)',cr,lf + defb '$' +firstchoice: + 01EH,0CH,0CH,0CH,0CH,0CH,'$' +nextline: + 0AH,'$' +; +hbaud: ;tell him about baud rates + uprint baudmsg + uprint crtocont + input + jp setbaud +; +setnum: + uprint menuheader + uprint menu4 + input + push af + uprint crlf + pop af + jmpif '1',hnum + jmpif '2',donum + jmpif 01BH,first + jp setnum +; +getone: + ld a,(curline) + inc a + ld (curline),a ;bumped pointer + call hex2in ;get 2 hex chars in c + jr nz,gadj +;wants to exit maybe + cp lf ;move cursor + ret z + ;must be esc then + pop hl ;clean stack + ld hl,(gohere) + jp (hl) ;oblidge him + ret z +;adjust changes flag +gadj: + ld a,0 + ld (change),a ;yes some changes +; +;record changes in mem image of cbios + ld de,0 + ld a,(curline) ;put here -1 + dec a + ld e,a + ld hl,(puthere) ;where to put changes + add hl,de ;hl points to char + ld a,c ;get char + ld (hl),a ;put him in mem + ret +; +; get two hex chars +hex2in: + inone ;get one key + cp 0AH ;move to next position + ret z + cp 01BH + ret z ;exit on esc + cp 030H ;0 the lowest one allowed + jr c,hex2in + cp 03AH ;tween 0 and 9 + jr c,setone + res 5,a ;make upper case if lower + cp 047H ;F the highest allowed + jr nc,hex2in + cp 041H ;must not be less than A + jr c,hex2in + printone + sub 7 ;remove bias + jr seta +setone: + printone +seta: + sub 030H ;take off bias + rlc a ;slowly + rlc a ;shift the + rlc a ;low nible + rlc a ;to the high nible + and 0F0H ;mask off the low nible + push af ;save it +settwo: ;force him to enter second char in hex + inone ;get one key + cp 0AH + jr z,s2 + cp 01BH + jr nz,s3 +s2: + pop hl ;clean stack + ret ;with z set to exit +s3: + cp 030H + jr c,settwo ;not acceptable + cp 03AH ;tween 0-9 + jr c,set3 + res 5,a ;make upper case if lower + cp 047H + jr nc,settwo ;not acceptable + cp 041H + jr c,settwo ;nogood + printone + sub 7 ;remove bias + jr set4 +set3: ;got second char in hex + printone +set4: + sub 030H + and 0FH ;ONLY WANT LOW NIBLE + ld c,a ;save it + pop af ;recover high nible + or c ;assembled char + ld c,a ;save char in a + ret nz + inc a ;must ret not zero + ret +; +; +donum: + ld hl,setnum + ld (gohere),hl ;where to exit to on esc + ld hl,cbios+039H + ld (puthere),hl + uprint numchoices +donum1: + ld a,0 ;first choice + ld (curline),a + sprint key0 + call getone + sprint key1 + call getone + sprint key2 + call getone + sprint key3 + call getone + sprint key4 + call getone + sprint key5 + call getone + sprint key6 + call getone + sprint key7 + call getone + sprint key8 + call getone + sprint key9 + call getone + sprint key10 ;- + call getone + sprint key11 ;, + call getone + sprint key12 ;enter + call getone + sprint key13 ;. + call getone + sprint key14 ;return +numpat: + inone + cp 01BH ;ESC + jp z,setnum + cp lf + jr nz,numpat + jp donum1 +; +numchoices: + defb 01AH + defb '----------------------------- Move the cursor to the key you wish',cr,lf + defb ': : : : :',cr,lf + defb ': 7 : 8 : 9 : - : to change. Use the [LINE FEED] key.',cr,lf + defb ': : : : :',cr,lf + defb ': 37 : 38 : 39 : 2D : The default HEXADECIMAL code will be',cr,lf + defb ';------;------;------;------:',cr,lf + defb ': : : : : the number which is flashing.',cr,lf + defb ': 4 : 5 : 6 : , :',cr,lf + defb ': : : : :',cr,lf + defb ': 34 : 35 : 36 : 2C : When you reach the key you wish to change.',cr,lf + defb ':------:------:------:------:',cr,lf + defb ': : : : : Type in the new HEXADECIMAL code.',cr,lf + defb ': 1 : 2 : 3 : :',cr,lf + defb ': : : : :',cr,lf + defb ': 31 : 32 : 33 : ENTER: (* NOTE: you must enter both digits *)',cr,lf + defb ':------:------:------: :',cr,lf + defb ': : : 0D : (* to change the code. *)',cr,lf + defb ': 0 : . : :',cr,lf + defb ': : : :',cr,lf + defb ': 30 : 2E : : Type the [ESC] key to return to the previous menu',cr,lf + defb '-----------------------------',cr,lf + defb '$' +; +key0: defb 01BH,'=',19+20H,6+20H,0FFH +key1: defb 01BH,'=',14+20H,3+20H,0FFH +key2: defb 01BH,'=',14+20H,10+20H,0FFH +key3: defb 01BH,'=',14+20H,17+20H,0FFH +key4: defb 01BH,'=',9+20H,3+20H,0FFH +key5: defb 01BH,'=',9+20H,10+20H,0FFH +key6: defb 01BH,'=',9+20H,17+20H,0FFH +key7: defb 01BH,'=',4+20H,3+20H,0FFH +key8: defb 01BH,'=',4+20H,10+20H,0FFH +key9: defb 01BH,'=',4+20H,17+20H,0FFH +key10: defb 01BH,'=',4+20H,24+20H,0FFH +key11: defb 01BH,'=',9+20H,24+20H,0FFH +key12: defb 01BH,'=',16+20H,24+20H,0FFH +key13: defb 01BH,'=',19+20H,17+20H,0FFH +key14: defb 01BH,'=',19+20H,41+20H,0FFH +hnum: + uprint nummsg + uprint crtocont + input + jp setnum +; +setcur: + uprint menuheader + uprint menu3 + input + push af + uprint crlf + pop af + jmpif '1',hcur + jmpif 01BH,first + jmpif '2',docur + jr setcur +; +; +docur: + ld hl,cbios+035H ;WHERE TO PUT CHANGES + ld (puthere),hl + ld hl,setcur + ld (gohere),hl ;ret here on esc + uprint curinst +doc1: + ld a,0 + ld (curline),a ;item to change + sprint cur0 ;left cursor key + call getone ;input etc + sprint cur1 + call getone + sprint cur2 + call getone + sprint cur3 + call getone + sprint cur4 ;type esc to exit +doc4: + inone ;get one key + cp 0AH + jp z,doc1 + cp 01BH + jr nz,doc4 + jp setcur +; + jp doc1 ;again +hcur: + uprint vecmsg + uprint crtocont + input + jp setcur +; +; +curinst: + defb 01AH + defb cr,lf + defb cr,lf + defb ' ---------------------------------',cr,lf + defb ' : : : : :',cr,lf + defb ' : ^ : : : <- : -> :',cr,lf + defb ' : : : v : : :',cr,lf + defb ' : : : : :',cr,lf + defb ' : 0B : 0A : 08 : 0C :',cr,lf + defb ' ---------------------------------',cr,lf + defb cr,lf + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb ' Move the cursor to the key which you wish to change by pressing',cr,lf + defb ' the [LINE FEED] key. The default HEXADECIMAL code will be the flashing number.',cr,lf + defb ' Type the new HEXADECIMAL number you wish to assign to the key.',cr,lf + defb cr,lf + defb ' You must type both digits to effect the change.',cr,lf + defb cr,lf + defb '$' +; +cur0: defb 01BH,'=',7+20H,15+20H,0FFH +cur1: defb 01BH,'=',7+20H,23+20H,0FFH +cur2: defb 01BH,'=',7+20H,31+20H,0FFH +cur3: defb 01BH,'=',7+20H,39+20H,0FFH +cur4: defb 01BH,'=',11+20H,18+20H,0FFH +setwr: + uprint menuheader + uprint menu2 + input + push af + uprint crlf + pop af + jmpif '1',hwr + jmpif '2',dowr + jmpif 01BH,first + jp setwr +; +dowr: + uprint wrinst +dow0: + sprint wr0 + inone + cp 0AH + jr z,dow1 + cp 01BH + jp z,setwr + cp 0DH + jr nz,dow0 +;got cr so do it set yes + ld a,0FFH ;set it on + ld (cbios+034H),a + ld a,0 + ld (change),a + jp setwr +dow1: + sprint wr1 + inone + cp lf + jr z,dow2 + cp 01BH + jr z,setwr + cp cr + jr nz,dow1 +;have choice set = 0 + ld a,0 + ld (cbios+034H),a + ld (change),a + jp setwr +dow2: + sprint wr2 + inone + cp 01BH + jp z,setwr + cp lf + jp nz,dow2 + jp dow0 +; +; +hwr: + uprint safmsg + uprint crtocont + input + jp setwr +; +wrinst: + defb 01AH,cr,lf + defb cr,lf,cr,lf + defb 'Yes I want Write Safe enabeled.',cr,lf + defb cr,lf + defb 'No do not enable Write Safe. This is the default mode on your KAYPRO II .',cr,lf + defb cr,lf + defb 'Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf,cr,lf + defb 'Use the [LINE FEED] key to move the cursor to the mode',cr,lf + defb 'which you wish to use and then type the [RETURN] key to',cr,lf + defb 'enter your choice.',cr,lf + defb cr,lf + defb '**** PLEASE read the help file before you enable Write Safe. ****',cr,lf + defb '**** If you do not understand it ASK your dealer. ****',cr,lf + defb '$' +; +wr0: defb 01BH,'=',3+20H,20H,0FFH +wr1: defb 01BH,'=',5+20H,20H,0FFH +wr2: defb 01BH,'=',7+20H,11+20H,0FFH +; +setio: + uprint menuheader + uprint menu1 + input ;get response + push af + uprint crlf + pop af + jmpif '1',hio + jmpif '2',doio + jmpif 01BH,first + jp setio +; +doio: + uprint ioinst + ld hl,cbios+033H + ld (puthere),hl + ld hl,setio + ld (gohere),hl +doio0: + ld a,0 + ld (curline),a + sprint io0 + call inio + sprint io1 + call inio +doioc: sprint io2 + call inio + sprint io3 + call inio +doioe: sprint io4 +doio1: + inone + cp 01BH + jp z,setio + cp 0AH + jr nz,doio1 + jp doio0 +; +inio: + inone ;get a char + cp 01BH + jr nz,inio1 + pop hl + ld hl,(gohere) + jp (hl) +inio1: + cp 0AH + jr nz,inio2 +;have line feed so bump cur line before returning + ld a,(curline) + inc a + ld (curline),a + ret +inio2: + cp 0DH + jr nz,inio +; must have a cr now process it + ld a,0 + ld (change),a ;yes some changes + ld a,(curline) + add a,a + ld de,0 + ld e,a + ld hl,ivtab + add hl,de ;hl now points to 1 of 4 + ld e,(hl) + inc hl + ld d,(hl) + ex de,hl + ld de,(puthere) ;where it goes + jp (hl) +ivtab: defw sio0 + defw sio1 + defw sio2 + defw sio3 +sio0: + ld a,(de) + res 1,a + set 0,a + ld (de),a + ld hl,doioc + ld a,2 + ld (curline),a + pop de + jp (hl) +sio1: + ld a,(de) + res 0,a + res 1,a + ld (de),a + ld a,(curline) + inc a + ld (curline),a + ret +sio2: + ld a,(de) + res 6,a + set 7,a + ld (de),a + ld hl,doioe + jp (hl) +sio3: + ld a,(de) + res 7,a + res 6,a + ld (de),a + ret +; +; +hio: + uprint iomsg + uprint crtocont + input + jp setio +; +; +ioinst: + defb 01AH + defb cr,lf,cr,lf + defb ' Default settings Posibile changes',cr,lf + defb ' ---------------- ----------------',cr,lf + defb cr,lf + defb ' CON:=CRT: CON:=TTY: Type the [LINE FEED] key to ',cr,lf + defb ' LST:=LPT: LST:=TTY: move the cursor to the mode ',cr,lf + defb ' PUN:=TTY: - none - you wish to select.',cr,lf + defb ' RDR:=TTY: - none - Then the RETURN key to enter',cr,lf + defb ' your selection.' + defb cr,lf + defb ' Type the [ESC] key to return to the previous menu.',cr,lf + defb cr,lf + defb '* CON: If you chose CON:=TTY: then all input and output will be through the',cr,lf + defb ' serial connector on the back of your KAYPRO II instead of through the',cr,lf + defb ' keyboard and the CRT.',cr,lf + defb cr,lf + defb cr,lf + defb '* LST: This setting will decide wether the output directed at a printer',cr,lf + defb ' will go through the LPT: (parallel connector) or to the',cr,lf + defb ' TTY: (serial connector).',cr,lf + defb '$' +; +io0: defb 01BH,'=',5+20H,12+20H,0FFH +io1: defb 01BH,'=',5+20H,36+20H,0FFH +io2: defb 01BH,'=',6+20H,12+20H,0FFH +io3: defb 01BH,'=',6+20H,36+20H,0FFH +io4: defb 01BH,'=',10+20H,19+20H,0FFH +; +go$out: ;here to exit check if any changes so as to + ;know wether to write to disk or not + ld a,(change) + cp 0FFH ;0FFH=nochanges + jp nz,askout +bye: + ld a,0 + ld (0FA34H),a ;reset write safe off + jp z,0 ;exit with no changes +; +; +askout: + uprint ask + input ;get response + res 5,a ;make upper case + cp 'N' + jp z,bye ;exit + cp 'Y' + jr nz,askout +; +; now to write the changes to the disk +procede: ;get on with it +;reset the disk system for drive B + ld a,0FFH + ld (0FA34H),a ;set the write safe flag + ld c,14 ;select disk + ld a,(disk) ;find out which disk to use + ld e,a + call 5 ;tell bdos +; +;set up initial paramaters + ld hl,cbios + ld (from),hl ;where to start writing from +; + ld bc,0001H + ld (track),bc ;track we will be using +; + ld bc,21 + ld (sector),bc ;first sector to write to +; + ld a,4 + ld (count),a ;how many sectors to write +; + ld hl,080H + ld (secsize),hl ;sector size +; +;now to do the writing on the disk +nextsec: + ld bc,(track) + call 0FA1EH ;set the track required +; + ld bc,(from) + call 0FA24H ;set the dma address +; + ld bc,(sector) + call 0FA21H ;set the sector to write +; + ld c,0 + call 0FA2AH ;write the sector +; check for error's on return + cp 0 ;a=0=no errors + jr z,go$on + uprint erms ;error message + uprint crtocont + input ;pause for any key to continue + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +go$on: + ld hl,(from) ;dma address + ld de,(secsize) + add hl,de ;bump dma address + ld (from),hl ;save it for reuse + ld a,(sector) + inc a ;bump sector number + ld (sector),a ;save for next write + ld a,(count) ;are we + dec a ;done yet + ld (count),a ;save in case we are not done + cp 0 + jp nz,nextsec ;not yet finished +; + uprint alldone + ld a,0 + ld (0FA34H),a ;reset write safe flag + jp config ;exit +; +change: defb 0 +disk: defb 0 +from: defw 0 +puthere: + defw 0 +track: defw 0 +sector: defw 0 +count: defb 0 +gohere: defw 0 +secsize: + defw 0 +crlf: defb cr,lf,'$' +alldone: + defb cr,lf,'DONE WITH CONFIGURATION',cr,lf,'$' +crtocont: + defb cr,lf,'Please type any key to continue','$' +erms: + defb cr,lf,'*** I can''t write to your disk ***',cr,lf,'$' +menuheader: + defb 01AH,cr,lf,cr,lf + defb 'KAYPRO II CONFIGURATION PROGRAM 11 July 1982' +; +choices: + defb cr,lf + defb '-----------------------------------------------' + defb cr,lf,cr,lf + defb 'CHOICES' + defb cr,lf + defb '-------' + defb cr,lf,cr,lf + defb '$' +menu0: ;first level menu + defb '1 --------> I/O Byte cold boot defaults' + defb cr,lf + defb '2 --------> Write Safe flag' + defb cr,lf + defb '3 --------> Cursor Keys definitions' + defb cr,lf + defb '4 --------> Numerical keypad definitions' + defb cr,lf + defb '5 --------> Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> EXIT this program and return to CP/M' + defb cr,lf + defb cr,lf + defb '(* NOTE: Anything not changed will contain its default value. *)' + defb cr,lf + defb cr,lf + defb 'Any changes that this program can make will only affect the disk in drive B.' + defb cr,lf + defb 'These changes will not be seen until you move the disk to drive A and' + defb cr,lf + defb 'push the RESET switch (Cold Boot) or turn the power off and on,' + defb cr,lf + defb 'EXCEPT selection ''5'' (Baud rate) which will have an immediate effect.' + defb cr,lf + defb 'Upon exiting this program you will be asked whether you want to apply' + defb cr,lf + defb 'the changes to the disk in drive B.' + defb cr,lf + defb 'Please enter ''1'' or ''2'' or ''3'' or ''4'' or ''5'' or [ESC] key ====>','$' +menu1: ;I/O BYTE menu + defb '1 --------> Help (I/O Byte definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the I/O Byte' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu2: ;write safe flag + defb '1 --------> Help (Write safe flag definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the write safe flag' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf + defb cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +; +menu3: ;cursor key + defb '1 --------> Help (Cursor key definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Cursor key settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu4: ;numerical key-pad + defb '1 --------> Help (Numerical keypad definitions)' + defb cr,lf + defb cr,lf + defb '2 --------> Change the Numerical keypad settings' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +menu5: ;baud rate + defb '1 --------> Help (Baud rate definitions)' + defb cr,lf,cr,lf + defb '2 --------> Change the Baud rate' + defb cr,lf + defb cr,lf + defb '[ESC] key ----> Return to main menu' + defb cr,lf,cr,lf + defb 'Please enter ''1'' or ''2'' or [ESC] key ==========>' + defb '$' +ask: + defb cr,lf + defb 'Y----------> procede to update the disk in drive B' + defb cr,lf + defb 'N----------> not ready, EXIT TO CP/M' + defb cr,lf + defb cr,lf + defb 'Please type (Y) or (N) ====>' + defb '$' +; +nummsg: + defb 1ah,cr,lf + defb 'On the right hand side of your KAYPRO II keyboard there is a group of',cr,lf + defb 'fourteen keys, labeled: 7 8 9 -',cr,lf + defb ' 4 5 6 ,',cr,lf + defb ' 1 2 3 enter',cr,lf + defb ' 0 .',cr,lf + defb cr,lf + defb 'These fourteen keys each produce a unique code when typed.',cr,lf + defb 'In some situations it may be useful to have one or more keys ',cr,lf + defb 'provide a special function, such as in an application',cr,lf + defb 'program requiring choices from a menu.',cr,lf + defb ' This portion of the CONFIGURATION program allows you to set the',cr,lf + defb 'codes which will be produced by these fourteen keys.',cr,lf + defb cr,lf,lf,lf,lf + defb '$' +baudmsg: + defb 1ah,cr,lf + defb 'Your KAYPRO II computer has a serial port with which you may communicate',cr,lf + defb 'with the outside world. This serial port is most often referred to as',cr,lf + defb 'RS-232. In using RS-232 both the computer and the external device',cr,lf + defb 'must be set at the same baud rate (the speed at which data travels)',cr,lf + defb cr,lf + defb ' Your KAYPRO II is capable of the following baud rates:',cr,lf + defb ' 50 -not used very often',cr,lf + defb ' 75 -not used very often',cr,lf + defb ' 110 -used with slower printers',cr,lf + defb ' 134.5 -used with some IBM printers',cr,lf + defb ' 150 -not used very often',cr,lf + defb ' 300 -very common (default on your KAYPRO II on reset)',cr,lf + defb ' 600 -not used very often',cr,lf + defb ' 1200 -used with many printers',cr,lf + defb ' 1800 -not used very often',cr,lf + defb ' 2000 -not used very often',cr,lf + defb ' 2400 -not used very often',cr,lf + defb ' 3600 -not used very often',cr,lf + defb ' 4800 -higher rate for faster printers',cr,lf + defb ' 7200 -not used very often',cr,lf + defb ' 9600 -highest rate normally used',cr,lf + defb '19200 -very high rate (for special purposes)',cr,lf + defb '(* NOTE: the PRESENT baud rate remains in effect until the next RESET *)' + defb '$' +iomsg: defb 1ah,cr,lf + defb 'In order to understand this command you should read the CP/M manual',cr,lf + defb '"AN INTRODUCTION TO CP/M FEATURES AND FACILITIES", the STAT command',cr,lf + defb 'logical and physical devices. The logical CP/M devices are: CON: LST:',cr,lf + defb 'RDR: and PUN:. The physical devices for the KAYPRO computer are:',cr,lf,lf + defb ' CRT: Video and Keyboard',cr,lf + defb ' TTY: Serial port (note the connector must be wired as in the manual)',cr,lf + defb ' LPT: Centronics port',cr,lf + defb ' UL1: This is the same as TTY: above',cr,lf + defb ' PTP: This is the same as TTY: above',cr,lf,lf + defb 'Possible logical to physical assignments are:',cr,lf,lf + defb ' CON: = TTY: or CRT:',cr,lf + defb ' RDR: = TTY:',cr,lf + defb ' PUN: = TTY: or CRT: or LPT: or UL1:',cr,lf,lf + defb 'BEFORE using this option try it with the STAT command in CP/M.',cr,lf + defb cr,lf,'$' +safmsg: defb 1ah, cr, lf + defb 'Your KAYPRO computer comes with a special "Write Safe" option that corrects',cr,lf + defb 'a problem with CP/M when running with SOME application programs. It is not',cr,lf + defb 'possible to make the following description nontechnical. If you do not under-',cr,lf + defb 'stand it, ask your dealer. The wrong setting of the "Write Safe" flag may cause',cr,lf + defb 'the IRREVOCABLE LOSS OF DATA AND OR PROGRAM(S).',cr,lf,lf + defb 'The KAYPRO computer uses deblocking. When a disk write operation is',cr,lf + defb 'immediately followed by a warm boot, the deblocking buffer may not be',cr,lf + defb 'written to the disk. This is not a likely sequence of events. Most programs',cr,lf + defb 'when finished writing to a file, will close it. ALL directory operations force',cr,lf + defb 'the deblock buffer to disk on write. The "Write Safe" flag tells the BIOS',cr,lf + defb 'that ALL disk operations are directory type. This forces the buffer to the',cr,lf + defb 'disk. The price is performance, as "Write Safe" will slow the computer down',cr,lf + defb 'from 2 to 4 times when writing to the disk. "Write Safe" is not a panacea',cr,lf + defb 'for system or program problems. The chance you will need it is rare.',cr,lf,lf + defb cr,lf,'$' +vecmsg: defb 1ah,cr,lf + defb 'It is not possible to make the following discription nontechnical.', cr, lf + defb 'If you do not understand it please ask your dealer.',cr,lf,lf + defb 'Your KAYPRO II computer comes with four arrow keys, they are at the upper right',cr,lf + defb 'of the main keyboard. They are usually referred to as CURSOR keys. They are ',cr,lf + defb 'used in programs such as SELECT to move the cursor. These keys produce codes',cr,lf + defb 'that are recognized by applications programs. The codes that they produce may',cr,lf + defb 'or may not be the codes that an application you supply wants. The codes sent',cr,lf + defb 'by the keyboard are unique, MSB set. The BIOS translates the keyboard codes',cr,lf + defb 'using a table in the BIOS. This option of the configure program allows you',cr,lf + defb 'to change the values in this table and record it on the disk. The memory',cr,lf + defb 'image is not changed until you cold boot (reset).',cr,lf,lf + defb cr,lf,'$' +;here begins the updated cbios which must eventually +;reside and operate at 0FA00H which is 01F80H in the sysgen image +;and is track 1 sectors 21-22-23-24 on the disk +; +cbios: ;label to allow update to find him +;*************************************** + .phase bios ;absolute location of code following + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + +;**************************************** + end config + \ No newline at end of file diff --git a/2006/toledo2/TINKER/COPY.MAC b/2006/toledo2/TINKER/COPY.MAC new file mode 100644 index 000000000..fdfb4da4b --- /dev/null +++ b/2006/toledo2/TINKER/COPY.MAC @@ -0,0 +1,513 @@ +title KAYPRO COPY (diskette copying utility) 2.0 Copyright (C) 1982 NLS, Inc. + +;############################################################### +;## High speed diskette copy program ## +;## Copyright (C) 1982 by Non-Linear Systems, Inc. ## +;## No warranty is made, expressed, or implied. ## +;## ## +;############################################################### +;## Last update: july 13,1982 [001] ## +;## by jim nickerson ## +;## fix spelling of verifing=verifying ## +;############################################################### + .z80 +maxsec equ 10 ; sectors/track +maxtrk equ 40 ; tracks/disk +cmnd equ 10H ; command port +data equ 13H ; data port +secp equ 12H ; sector port +trkp equ 11H ; track port +status equ 10H ; status port +rdcmd equ 80H ; read sector command +rdmask equ 9CH ; read status mask +wrtcmd equ 0A0H ; write sector command +wrtmask equ 0FCH ; write status mask +ficmd equ 0D0H ; force int command +seekcmd equ 10H ; seek command +rstcmd equ 00 ; home command +bitport equ 1CH ; system bit port +cr equ 0DH ; ascii return +lf equ 0AH ; ascii line feed +bdos equ 5 ; bdos entry point + +; print a message +print macro x + ld c,9 + ld de,x + call 5 + endm + +; get a char from console, up case +input macro + ld c,1 + call 5 + res 5,a + endm +; +; +;******************************************************** +; +; + call disdoff + +ask: + call endoff + ld a,0FFH + ld (some),a ;reset error flag=no errors + print menu + input ; get a character + call disdoff + cp 'C' ; copy? + jp z,copy1 + cp 'F' ;fast copy? + jp z,fcopy1 + cp 'V' ;verify? + jp z,veri1 + cp 'E' ; Exit? + jr nz,ask + call endoff + jp 0 +; +; +;fix so disk won't turn off when any key hit +; +disdoff: + push hl + push de + ld hl,(0FA0AH) ;orig conin jmp in cbios + ld (oldconin),hl ;save it + ld de,0AH + add hl,de + ld (0FA0AH),hl + pop de + pop hl + ret +; +endoff: + push hl + ld hl,(oldconin) ;get original + ld (0FA0AH),hl ;restore it + pop hl + ret +; +oldconin: + defw 0 +; +; + +copy1: + call copy ; copy disk +veri1: + call verify ; verify disk + jr wifer +fcopy1: + call copy ; copy disk only + jr ask +wifer: ;wait for char if error has occured + call endoff + ld a,(some) ;error flag + cp 0 ;0=some errors + jr nz,getout + print pause + input + jp ask +; +getout: + print adone + jp ask +; + +copy: ld a,(66H) ; get and save byte at nmi + ex af,af' + ld a,0C9H ; RET op code + ld (66H),a + print crlf + print crlf + call diskon ; turn on disk drives + call home ; home both disk drives + xor a ; zero track number +dotrk: ld (track),a ; set track number + call seeka ; seek track drive a + print back + call tellt ; tell crt track number + ld hl,buff ; starting track image + ld (dmaadr),hl + xor a ; zero sector number +doa: ld (sector),a ; store sector number + call read ; read a physical sector to dmaadr + call nz,tella ; error, tell track and sector + ld a,(sector) ; next sector + inc a + cp maxsec ; end of track? + jr c,doa ; another sector yet to do + call seekb ; now write track to b, seek track + ld hl,buff ; back to beginning of buffer + ld (dmaadr),hl + xor a ; reset sector +dob: ld (sector),a ; current sector + call write ; write sector to disk + call nz,tellb ; error, tell track and sector + ld a,(sector) ; move to next sector + inc a + cp maxsec ; end of track? + jr c,dob ; more sectors + ld a,(track) ; next track + inc a + cp maxtrk ; end of disk? + jp c,dotrk + ex af,af' + ld (66H),a ; restore byte at nmi vector + print adone + ret ; go back to main p/g + + + +verify: ld a,(66H) ; ‰get and save byte at nmi vector + ex af,af' + ld a,0C9H ; RET op code + ld (66H),a + print crlf + print crlf + print vermsg ; tell crt that verify p/g is beginning + print crlf + print crlf + call diskon ; turn disk drives on + call home ; home both disk drives + xor a ; zero track number +vrtrk: ld (track),a ; set track number + call seeka + print back + call tellt ; tell the track number + ld hl,buff ; set up dma adrs + ld (dmaadr),hl + xor a ; zero sector number + +vera: ld (sector),a ; store current sector number + call read ; read a physical sector to dmaadr + call nz,tella ; error, tell track and sector + ld a,(sector) ; read all of track + inc a + cp maxsec + jr c,vera + call seekb ; seek track drive B + ld hl,buffb ; set up dma adrs for disk B + ld (dmaadr),hl + xor a +verb: ld (sector),a ; set up sector + call read ; read sector from B + call nz,tellb ; tell any errors from read + ld a,(sector) ; next sector + inc a + cp maxsec ; end of track? + jr c,verb ; another sector yet to do + call vrdata ; go verify data on tracks +vert: ld a,(track) ; next track + inc a + cp maxtrk ; end of disk? + jp c,vrtrk + ex af,af' + ld (66H),a ; restore byte at nmi vector + ret +; + +vrdata: ld bc,0 ; reset error count + ld (bytcnt),bc + ld de,buff ; starting adrs of disk A buffer + ld (adrsa),de ; store it + ld hl,buffb ; starting adrs of disk B buffer + ld (adrsb),hl ; store it +vrdat: ld a,(hl) ; get disk B data byte + ld b,a ; save it + ld a,(de) ; get disk A data + cp b ; is the data the same + jp nz,vrerr ; no -- go tell about error + ld bc,(bytcnt) ; add one to loop counter + inc bc + ld (bytcnt),bc + ld a,14H + cp b ; have 5120 bytes been verrified + ret z ; yes -- go read next track + ld hl,(adrsb) + inc hl ; inc drive B adrs + ld (adrsb),hl + ld de,(adrsa) + inc de ; inc drive A adrs + ld (adrsa),de + jr vrdat ; loop till done + +vrerr: print crlf + push af + ld a,0 + ld (some),a ;set error flag + pop af + print datadrs ; tell which byte number is in error + ld bc,(bytcnt) ; get the count and display it + ld c,b + call outhex + ld bc,(bytcnt) + call outhex + print datis ; drive B data is + ld hl,(adrsb) + ld a,(hl) ; get data from drive B + ld c,a ; set up bad data from B + call outhex + print datsb + ld de,(adrsa) + ld a,(de) ; get data from drive A + ld c,a ; data should be + call outhex + print crlf + jp vert ; go get next track after one error + +read: ld de,rdmask*256+rdcmd + jr action +write: ld de,wrtmask*256+wrtcmd + ; +action: call xlate ; to physical sector number + out (secp),a ; set sector number + ld l,6 ; 5 re-tries on bad sector + push hl + ld hl,(dmaadr) ; address of disk i/o +alp: ld bc,data ; b=0, c=port # + ld a,e + cp wrtcmd ; write op? + jr z,wrt + ; + out (cmnd),a ; read loop +rl1: halt ; read in first 256 bytes + ini + jp nz,rl1 +rl2: halt ; read in second 256 bytes (256+256)=512 + ini + jp nz,rl2 + jr done + ; +wrt: out (cmnd),a ; write loop +wrt1: halt ; write first 256 bytes + outi + jp nz,wrt1 +wrt2: halt ; write second 256 bytes + outi + jp nz,wrt2 + ; +done: ld (dmaadr),hl ; save new dma address (auto inc on rd/wrt) + call busy ; wait for crc + and d ; status mask + pop hl ; error re-try count + ret z ; no error + dec l ; down error count + jr z,error ; max error count if Z + push hl + ld hl,(dmaadr) ; correct dma address + ld bc,512 + or a + sbc hl,bc + jr alp +error: + ld a,0 + ld (some),a + ld a,0FFH + or a + ret ; ret non-zero (error) + +xlate: ld hl,tran ; un-skew track (formatted skewed) + ld c,a ; copy disk logical sector number + ld b,0 + add hl,bc ; as index into skew table + ld a,(hl) ; got it + ret + +tran: + defb 0, 8, 3, 6 + defb 1, 9, 4, 7 + defb 2,5 +; new translate table + +seeka: ld b,01H ; select disk mask + jr seekx + ; +seekbv: ld b,02h ;select diak mask + jr seekx + +seekb: ld b,02H + in a,(trkp) ; drive b is always one behind + or a ; except on track 00 + jr z,seekx + dec a ; back one + out (trkp),a + ; +seekx: ld a,ficmd ; force int + out (cmnd),a + in a,(bitport) ; select disk + and 0FCH + or b + out (bitport),a ; done + ld a,(track) ; now seek desired track + out (data),a + ld a,seekcmd + out (cmnd),a ; issue command + +busy: halt ; wait for command done +bsy: in a,(status) ; busy? (may be drq not int) + bit 0,a + jr nz,bsy + ret ; done + +home: in a,(bitport) ; select drive B + and 0FCH + push af ; save + set 1,a + out (bitport),a + ld a,rstcmd ; home drive B + out (cmnd),a + call busy ; wait for done + pop af + set 0,a ; select drive A + out (bitport),a + ld a,rstcmd ; home drive A + out (cmnd),a + call busy ; wait for done + ret + +diskon: in a,(bitport) ; turn on disk drive + res 6,a + out (bitport),a + ld b,50 ; delay for motor up to speed +don1: ld de,1670 +don2: dec de + ld a,d + or e + jp nz,don2 + djnz don1 + ret + +outdec: push bc ; save number in c + ld a,c ; decimal print the number in c + ld e,'0' ; e hold decimal digit +hund: sub 100 ; any hundreds digits? + jr c,tens + inc e ; bump hundreds digit + jr hund +tens: add a,100 ; put back 100 + push af ; save number + ld a,e ; leading zero digit? + cp '0' + jr z,ten1 + ld c,2 + call bdos ; write digit +ten1: pop af ; recover digit + ld e,'0' ; tens digit +ten2: sub 10 + jr c,ones + inc e ; bump tens digit + jr ten2 +ones: add a,10+'0' + push af ; save number, print digit + ld c,2 + call bdos ; tens digit + pop af + ld e,a + ld c,2 + call bdos ; ones digit + pop bc ; restore number to c + ret ; done + +outhex: push de ; save incomming regs + push bc + ld a,c ; get data to be output + and 0fh ; mask it for lsb nibble + ld b,a ; save it + push bc + rrc c ; adjust msb nibble + rrc c + rrc c + rrc c + ld a,c + and 0fh ; mask it + call outcrt ; output msb to crt + pop bc + ld a,b + call outcrt ; output lsb to crt + pop bc ; restore registers + pop de + ret +outcrt: cp 0ah ; is it more than 9 + jp c,outc ; no + add a,37h ; yes add in alpha displacement +outcr: ld e,a ; set up for output to crt + ld c,2 + call bdos + ret +outc: add a,30h ; add in numerial displacement + jr outcr + +tellt: print trkmsg ; tell track number + ld bc,(track) + call outdec ; print track number + ret + +tella: print back ; bad sector on drive a + print drva ; "DRIVE A " +telerr: + ld a,0 + ld (some),a + call tellt ; "TRACK XX" + print secmsg ; " SECTOR " + ld a,(sector) ; find physical sector number + call xlate + ld c,a + call outdec ; "XX" + print badmsg + print crlf + call tellt ; still on this track + ret + +tellb: print back ; bad sector on drive b + print drvb + jr telerr ; common code + +menu: +signon: defb 1AH,cr,lf,lf,lf + defb 'KAYPRO II Double density diskette copy/verify program 13 July 1982',cr,lf + defb cr,lf + defb '-------------------------------------------------------------------' + defb cr,lf,lf + defb 'This program copies/verifies the diskette in drive A to a diskette in drive B' + defb cr,lf,cr,lf + defb 'OPTIONS' + defb cr,lf + defb '-------' + defb cr,lf,cr,lf + defb 'Copy/verify----> Diskette in drive B must have been formatted',cr,lf,cr,lf + defb 'Fast copy------> Does not verify after copy',cr,lf,cr,lf + defb 'Verify---------> Verify disk B is the same as disk A',cr,lf,cr,lf + defb 'Exit-----------> Exit to CP/M (before typing place system disk in A)',cr,lf,cr,lf + defb '(C)opy/verify (F)ast-copy (V)erify (E)xit',cr,lf + defb 'Please enter ''C'' or ''F'' or ''V'' or ''E'' ==>','$' +crlf: defb cr,lf,'$' +trkmsg: defb 'Track ','$' +secmsg: defb ' Sector ','$' +drva: defb 'Drive A ','$' +drvb: defb 'Drive B ','$' +badmsg: defb ' {BAD}','$' +back: defb cr,'$' +adone: defb cr,'DONE ',cr,lf,'$' +pause: defb cr,'Please type any key to continue.','$' +vermsg: defb 'Verifying disk B to disk A',cr,lf,lf + defb ' *** NOTE: only one error per track is displayed (there may be more) ***','$' +datadrs: defb 'Drive B byte ','$' +datis: defb ' data is ','$' +datsb: defb ' should be ','$' +dmaadr: defw buff ; dma pointer + defb 0 +some: defs 1 + defb 0 +track: defb 0 ; current track +sector: defb 0 ; current sector +bytcnt: defs 2 ; sector verify loop count +adrsa: defs 2 ; storage area for disk A buffer +adrsb: defs 2 ; storage area for disk B buffer +buff equ $ ; track buffer +buffb equ $+5120 ; read buffer + end + \ No newline at end of file diff --git a/2006/toledo2/TINKER/FORMAT.MAC b/2006/toledo2/TINKER/FORMAT.MAC new file mode 100644 index 000000000..bac2a199f --- /dev/null +++ b/2006/toledo2/TINKER/FORMAT.MAC @@ -0,0 +1,404 @@ +title KAYPRO FORMAT (double density diskette format program) 2.0, Copyright (C) 1982 NLS, Inc. +;####################################################### +;## ## +;## Double density diskette format program ## +;## ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc.## +;## ## +;####################################################### +;## Last Update: july 13,1982 [001] ## +;## by jim nickerson ## +;## -added verify it's formatted ## +;####################################################### + .z80 +wboot equ 0 ; restart system entry point (Warm boot) +bdos equ 5 ; bdos entry +crlf equ 0D0AH ; new line codes +cr equ 0DH +lf equ 0AH +return equ 0DH ; ascii return code +esc equ 1BH ; ascii esc +frsttrk equ 0 ; first track # +lsttrk equ 39 ; last track # +nsects equ 10 ; last sector # +data equ 013H ; controller data port +cmnd equ 010H ; controller command port +status equ 010H ; status port for controller +wrtcmd equ 0F4H ; write track command +rdcmd equ 0E4H ; read track command +rstcmd equ 000H ; restore command +seekcmd equ 010H ; seek command +dskcode equ 012H ; select unit B: double density +bitport equ 01CH ; drive select port +maxsec equ 010 ; maximum number of tracks +secp equ 012H ; sector port + +; print a message +print macro x + ld c,9 + ld de,x + call bdos + endm + +; get a char from console, up case +input macro + ld c,1 + call bdos + res 5,a + endm + +; write cnt number of val bytes into memory (hl) +bytes macro val, cnt + local loop + ld de,cnt +loop: ld (hl),val + inc hl + dec de + ld a,d + or e + jr nz,loop + endm + +; call bios routine, x=bios jump table #, 0=wboot, 1=const, 2=conin,... +bios macro x + local retadr + ld hl,(1) + ld de,x*3 + add hl,de + ld de,retadr + push de + jp (hl) +retadr: + endm + +start: + call disdoff +ask: + call endoff + print prompt ; ask for action command + input ; get char from console + cp 'F' + jp z,format + cp 'S' + jp z,single + cp 'E' ; abort? + jp z,newexit ; exit + CP 'V' ;VERIFY DISK B READABLE + JP NZ,ASK + call disdoff + CALL ENT1## ;USE CPYVR ROUTINES + + jr ask ; invalid input, ask again +; +; fix so that disk won't turn off if key pressed during format +; +disdoff: + push hl ;preserve him + push de + ld hl,(0FA0AH) ;ORIGINAL CONIN ROUTINE + ld (oldconin),hl ;save forreplacement + ld de,0AH + add hl,de + ld (0FA0AH),hl + pop de + pop hl + ret +; +endoff: + push hl + ld hl,(oldconin) + ld (0FA0AH),hl + pop hl + ret +; +newexit: + ld hl,(oldconin) + ld (0FA0AH),hl ;set him back to original + jp wboot +; +oldconin: + defw 0 +; +; + +format: + call disdoff + print diskb + input + cp return ; did user push key? + jr nz,ask ; back to prompt line + print newline + call seldsk ; select disk B: + call home ; home disk drive + ld c,frsttrk ; first track # +form1: push bc ; save track number while printing it + print smsg4 ; "Track number:" + pop bc + call outdec ; display track number + call settrk ; move to track given by c + call maktrk ; make track image, track # in c + call wrttrk ; format track + inc c ; up track count + ld a,c ; max track+1 reached? + cp lsttrk+1 + jr nz, form1 ; do another track + print done +; + .8080 + CALL ENT1## + .Z80 +; + jp ask ; done, more formatting to do? + +single: + print smsg1 ; ask for track number + call indec ; get integer into reg c + cp esc ; want out? + jp z,ask + push bc + print smsg2 ; tell track number to verify with user + pop bc + push bc + call outdec ; print number in reg c + print smsg3 ; ask if to continue + input + pop bc ; recover sector number + cp return + jp nz,ask ; user wants out + call seldsk ; select disk + call home ; home disk drive + call settrk ; move to track given by c + call maktrk ; make track image, track # in c + call wrttrk ; format track + jp ask ; go back to menu + + + +maktrk: ld hl,tran ; sector skew table + push hl ; store on stack for use + ld hl,track ; hl^ to track image in memory + ld b,nsects ; number of sectors to gen + + bytes 04EH, 80 ; post index gap + bytes 0, 12 + bytes 0F6H, 3 ; Writes C2 + bytes 0FCH, 1 ; index AM + bytes 04EH, 16 ; pre ID gap + +trksec: bytes 0, 8 + bytes 0F5H, 3 ; Writes A1 + bytes 0FEH, 1 ; ID AM + ld (hl),c ; track number + inc hl + bytes 0, 1 ; side number = 00 + ex (sp),hl ; pointer to tran table + ld a,(hl) ; pick up sector number + inc hl ; next table entry + ex (sp),hl ; back on stack + ld (hl),a ; sector number + inc hl + bytes 2, 1 ; sector length = 512 + bytes 0F7H, 1 ; CRC + bytes 04EH, 22 ; post ID gap + bytes 0, 12 + bytes 0F5H, 3 ; writes A1 + bytes 0FBH, 1 ; data AM + bytes 0E5H, 512 ; data field + bytes 0F7H, 1 ; CRC + bytes 04EH, 26 ; post data gap / pre ID gap + + dec b ; down sector count + jp nz,trksec ; another sector to do in image? + + bytes 04EH, 30 ; pre index gap + or a ; clear carry + ld de, track ; compute length of track + sbc hl,de + ld (trklen),hl + ex (sp),hl ; tran tbl adr not needed + pop hl + ret ; exit with hl=len of track + +tran: ;new translate table + defb 0, 8, 3, 6 + defb 1, 9, 4, 7 + defb 2, 5 +; + +xlate: push bc + push hl + ld hl,tran + ld c,a ;copy disk logical sector number + ld b,0 + add hl,bc + ld a,(hl) ; translated sector number + pop hl + pop bc + ret + +indec: ld c,0 ; enter a decimal number into c +inlp: push bc ; save deciamal number in c + ld c,1 ; get a console character + call bdos + pop bc + cp '0' + ret c ; ascii value less than '0' + cp '9'+1 + ret nc ; ascii value gtr than '9' + sub '0' + ld b,a ; save decimal digit in b + ld a,c + add a,a ; times 2 + add a,a ; times 4 + add a,c ; times 5 + add a,a ; times 10 ( a=c*10 ) + add a,b ; a=(c*10)+b + ld c,a + jr inlp ; go get another digit + +outdec: push bc ; save number in c + ld a,c ; decimal print the number in c + ld e,'0' ; e hold decimal digit +hund: sub 100 ; any hundreds digits? + jr c,tens + inc e ; bump hundreds digit + jr hund +tens: add a,100 ; put back 100 + push af ; save number + ld a,e ; leading zero digit? + cp '0' + jr z,ten1 + ld c,2 + call bdos ; write digit +ten1: pop af ; recover digit + ld e,'0' ; tens digit +ten2: sub 10 + jr c,ones + inc e ; bump tens digit + jr ten2 +ones: add a,10+'0' + push af ; save number, print digit + ld c,2 + call bdos ; tens digit + pop af + ld e,a + ld c,2 + call bdos ; ones digit + pop bc ; restore number to c + ret ; done + +seldsk: ld a,dskcode ; select format disk + out (bitport),a + ret + +home: ld a,rstcmd ; re-zero disk drive + out (cmnd),a + jr busy ; wait for command done + +settrk: push bc ; seek track + ld a,c ; track # + out (data),a + ld a,seekcmd ; command + out (cmnd),a + pop bc + jr busy + +busy: call delay ; delay for controller to set busy bit +bsy: in a,(status) ; wait for not busy + bit 0,a + jr nz,bsy + ret +delay: call dly +dly: ex (sp),hl + ex (sp),hl + ret + +wrttrk: push bc + ld hl,(trklen) ; length of track in byte + ex de,hl + ld c,data + ld hl,track ; hl^ to track image, de is length + ld a,(66H) ; save byte at nmi + push af + ld a,0C9H ; store return inst at nmi + ld (66H),a + ld a,wrtcmd ; track write command + out (cmnd),a ; issue command +wrtlp: halt ; wait for controller + outi ; issue data byte pointed to by hl + dec de ; count=count-1 + ld a,d ; count zero? + or e + jp nz,wrtlp ; more bytes + pop af ; recover byte at nmi + ld (66H),a + pop bc + ret + +prompt: +signon: + defb 01AH + defw crlf,crlf + defb 'KAYPRO II Double density diskette format program 13 July 1982' + defw crlf + defb '------------------------------------------------------------------' + defw crlf, crlf + defb 'All activity will take place on drive B' + defw crlf, crlf + defb 'OPTIONS' + defw crlf + defb '-------' + defw crlf + defw crlf + defb 'Exit--------> exit this program and return to CP/M' + defw crlf,crlf + defb 'Format------> format the diskette in drive B' + defw crlf + defb ' (it will erase all information on it !)' + defw crlf,crlf + defb 'Single------> format 1 track on the diskette in drive B' + defw crlf,crlf + defb 'Verify------> verify the diskette in drive B is readable' + defw crlf + defb ' (this is a non destructive test)' + +rompt: defw crlf,crlf + defb '(E)xit (F)ormat (S)ingle (V)erify' + DEFW CRLF + defb 'Please enter ''E'' or ''F'' or ''S'' or ''V'' ==>','$' + +diskb: defw crlf, crlf + defb 'Insert diskette to format into drive B.' + defw crlf + defb 'Enter key to format, any other key to abort $' + +smsg1: defw crlf, crlf + defb 'Format a single track of the diskette' + defw crlf + defb 'Enter track number ( key to abort) xx', 8,8,'$' + +done: defb cr,'DONE ',cr,lf,'$' +smsg2: defw crlf +smsg4: defb return, 'Formatting track:$' + +smsg3: defb ' Enter to format, any other key to abort $' + +secmsg: defb ' Sector ','$' + + +newline:defw crlf + defb '$' + +trklen: defw 0 ; length of track + +sector: defs 2 ; sector number +adrsa: defs 2 ; format data pointer +adrsb: defs 2 ; read buffer pointer +bytcnt: defs 2 ; byte count +dmaadr: defw track ; dma adrs storage area + + dseg +track: ; this is a diskette track image to be formed by the program + + end + \ No newline at end of file diff --git a/2006/toledo2/TINKER/FORVR.MAC b/2006/toledo2/TINKER/FORVR.MAC new file mode 100644 index 000000000..f8f3c4fa3 --- /dev/null +++ b/2006/toledo2/TINKER/FORVR.MAC @@ -0,0 +1,282 @@ +title KAYPRO FORMAT (double density diskette format program) 2.0, Copyright (c) 1982 NLS, Inc. +subttl Verify portion of format program +;############################################################### +;## High speed diskette verify program ## +;## Copyright (C) 1982 by Non-Linear Systems, Inc. ## +;## No warranty is made, expressed, or implied. ## +;## ## +;############################################################### +;## Last update : july 13,1982 [001] ## +;## by jim nickerson ## +;## will verify b: to be readable ## +;## fix spelling of verifing=verifying ## +;############################################################### + .z80 +maxsec equ 10 ; sectors/track +maxtrk equ 40 ; tracks/disk +cmnd equ 10H ; command port +data equ 13H ; data port +secp equ 12H ; sector port +trkp equ 11H ; track port +status equ 10H ; status port +rdcmd equ 80H ; read sector command +rdmask equ 9CH ; read status mask +wrtcmd equ 0A0H ; write sector command +wrtmask equ 0FCH ; write status mask +ficmd equ 0D0H ; force int command +seekcmd equ 10H ; seek command +rstcmd equ 00 ; home command +bitport equ 1CH ; system bit port +cr equ 0DH ; ascii return +lf equ 0AH ; ascii line feed +bdos equ 5 ; bdos entry point + +; print a message +print macro x + ld c,9 + ld de,x + call 5 + endm + +; get a char from console, up case +input macro + ld c,1 + call 5 + res 5,a + endm + + .8080 +ENT1:: ;EXTERNAL ENTRY FOR FORMAT VERIFY + .Z80 +; + ld a,0FFH ;RESET ERROR RECORD + ld (some),a ;save it + +verify: ld a,(66H) ; ‰get and save byte at nmi vector + ex af,af' + ld a,0C9H ; RET op code + ld (66H),a + print crlf + print crlf + print vermsg ; tell crt that verify p/g is beginning + print crlf + print crlf + call diskon ; turn disk drives on + call home ; home both disk drives + xor a ; zero track number +vrtrk: ld (track),a ; set track number + print back + call tellt ; tell the track number + call seekb ; seek track drive B + ld hl,buffb ; set up dma adrs for disk B + ld (dmaadr),hl + xor a +verb: ld (sector),a ; set up sector + call read ; read sector from B + call nz,tellb ; tell any errors from read + ld a,(sector) ; next sector + inc a + cp maxsec ; end of track? + jr c,verb ; another sector yet to do +vert: ld a,(track) ; next track + inc a + cp maxtrk ; end of disk? + jp c,vrtrk + ex af,af' + ld (66H),a ; restore byte at nmi vector + ld a,(some) + cp 0 ;0=error has been recorded + jr nz,getout +;tell him about it (pause for cr + print pause + input + ret +; +getout: + print ok + ret ; go back to main p/g + + +read: ld de,rdmask*256+rdcmd + ; +action: call xlate ; to physical sector number + out (secp),a ; set sector number +TRYS:: ld l,1 ;better be good first time + push hl + ld hl,(dmaadr) ; address of disk i/o +alp: ld bc,data ; b=0, c=port # + ld a,e + ; + out (cmnd),a ; read loop +rl1: halt ; read in first 256 bytes + ini + jp nz,rl1 +rl2: halt ; read in second 256 bytes (256+256)=512 + ini + jp nz,rl2 +; ; +done: ld (dmaadr),hl ; save new dma address (auto inc on rd/wrt) + call busy ; wait for crc + and d ; status mask + pop hl ; error re-try count + ret z ; no error + dec l ; down error count + jr z,error ; max error count if Z + push hl + ld hl,(dmaadr) ; correct dma address + ld bc,512 + or a + sbc hl,bc + jr alp +error: ld a,0FFH + or a + ret ; ret non-zero (error) + +xlate: ld hl,tran ; un-skew track (formatted skewed) + ld c,a ; copy disk logical sector number + ld b,0 + add hl,bc ; as index into skew table + ld a,(hl) ; got it + ret + +; new un skew table +tran: + defb 0, 8, 3, 6 + defb 1, 9, 4, 7 + defb 2, 5 +; + + ; +seekbv: ld b,02h ;select diak mask + jr seekx + +seekb: ld b,02H + jr seekx ;want actual track + in a,(trkp) ; drive b is always one behind + or a ; except on track 00 + jr z,seekx + dec a ; back one + out (trkp),a + ; +seekx: ld a,ficmd ; force int + out (cmnd),a + in a,(bitport) ; select disk + and 0FCH + or b + out (bitport),a ; done + ld a,(track) ; now seek desired track + out (data),a + ld a,seekcmd + out (cmnd),a ; issue command + +busy: halt ; wait for command done +bsy: in a,(status) ; busy? (may be drq not int) + bit 0,a + jr nz,bsy + ret ; done + +home: in a,(bitport) ; select drive B + and 0FCH + push af ; save + set 1,a + out (bitport),a + ld a,rstcmd ; home drive B + out (cmnd),a + call busy ; wait for done + pop af + ret ;only want to verify read on b for now + set 0,a ; select drive A + out (bitport),a + ld a,rstcmd ; home drive A + out (cmnd),a + call busy ; wait for done + ret + +diskon: in a,(bitport) ; turn on disk drive + res 6,a + out (bitport),a + ld b,50 ; delay for motor up to speed +don1: ld de,1670 +don2: dec de + ld a,d + or e + jp nz,don2 + djnz don1 + ret + +outdec: push bc ; save number in c + ld a,c ; decimal print the number in c + ld e,'0' ; e hold decimal digit +hund: sub 100 ; any hundreds digits? + jr c,tens + inc e ; bump hundreds digit + jr hund +tens: add a,100 ; put back 100 + push af ; save number + ld a,e ; leading zero digit? + cp '0' + jr z,ten1 + ld c,2 + call bdos ; write digit +ten1: pop af ; recover digit + ld e,'0' ; tens digit +ten2: sub 10 + jr c,ones + inc e ; bump tens digit + jr ten2 +ones: add a,10+'0' + push af ; save number, print digit + ld c,2 + call bdos ; tens digit + pop af + ld e,a + ld c,2 + call bdos ; ones digit + pop bc ; restore number to c + ret ; done + +; +tellt: print trkmsg ; tell track number + ld bc,(track) + call outdec ; print track number + ret + +tellb: + ld a,0 ;record an error + ld (some),a + print back ; bad sector on drive b + print drvb +telerr: call tellt ; "TRACK XX" + print secmsg ; " SECTOR " + ld a,(sector) ; find physical sector number + call xlate + ld c,a + call outdec ; "XX" + print badmsg + print crlf + call tellt ; still on this track + ret + +crlf: defb cr,lf,'$' +trkmsg: defb 'Track ','$' +secmsg: defb ' Sector ','$' +drva: defb 'Drive A ','$' +drvb: defb 'Drive B ','$' +badmsg: defb ' {BAD}','$' +back: defb cr,'$' +ok: defb cr,'Format OK',cr,lf,'$' +pause: defb cr,'Please type any key to continue.','$' +vermsg: defb 'Verifying disk B to be readable',cr,lf,lf + defb ' *** NOTE: only one error per track is displayed (there may be more) ***','$' +some: defb 0 ;error has occured +dmaadr: defw buff ; dma pointer +track: defb 0 ; current track +sector: defb 0 ; current sector +bytcnt: defs 2 ; sector verify loop count +adrsa: defs 2 ; storage area for disk A buffer +adrsb: defs 2 ; storage area for disk B buffer + DSEG +buff equ $ ; track buffer +buffb equ $+5120 ; read buffer + end + \ No newline at end of file diff --git a/2006/toledo2/TINKER/KBIOS.HEX b/2006/toledo2/TINKER/KBIOS.HEX new file mode 100644 index 000000000..e69de29bb diff --git a/2006/toledo2/TINKER/KBIOS.MAC b/2006/toledo2/TINKER/KBIOS.MAC new file mode 100644 index 000000000..541f5301a --- /dev/null +++ b/2006/toledo2/TINKER/KBIOS.MAC @@ -0,0 +1,274 @@ +title KAYPRO CBIOS for CP/M 2.2 +;############################################################### +;## KAYPRO CBIOS for CP/M 2.2 ## +;## Copyright (C) 1982 By Non-Linear Systems, Inc. ## +;## No warranty is made, expressed or implied. ## +;############################################################### +;## Last Update: july 7,1982 [001] ## +;## by jim nickerson +;## changes: ## +;## -allow redefinition of kpd in cbios ## +;## -change to allow test of serial on liststatus## +;## -default ul1: to tty on list ## +;############################################################### + + .Z80 ; Z80 CPU +msize equ 64 ; system memory size in k +vers equ 22 ; CP/M version number +bias equ (msize-20)*1024 ; bias for systems larger than 20k +ccp equ 3400H+bias ; start of CCP +bdos equ ccp+806H ; start of BDOS (The resident portion of CP/M) +bios equ ccp+1600H ; start of Basic I/O Subsystem (BIOS) +cpml equ bios-ccp ; length of CP/M system in bytes (less BIOS) +nsects equ cpml/128 ; length of CP/M system in sectors (less BIOS) +trksec equ 40 ; sectors/track + +bitport equ 1CH ; status/control bit maped port +iobyte equ 3 ; logical to physical map +rom equ 00000H ; base of rom +ram equ 0FC00H ; scratch ram +dmaadr equ ram+14H ; dma address + + jp boot ; arrive here from cold start + jp wboot ; arrive here for warm start + jp const ; console status return in A FF=ready, 00=not + jp conin ; console char in + jp conout ; console char out + jp list ; listing char out + jp punch ; punch char out + jp reader ; reader char in + jp home ; move to track 0 on selected disk drive + jp seldsk ; select disk drive + jp settrk ; set track # + jp setsec ; set sector # + jp setdma ; set DMA address + jp read ; read selected sector + jp write ; write selected sector + jp listst ; list status (Ready to print a char) + jp sectran ; sector translate +ioconfig: defb 10000001B ; initial value for i/o byte (may be patched) +wrtsafe: defb 0 ; write safe flage 0=false +vtab: defb 11, 10, 8, 12 ; vector pad xlate table ^k ^j ^h ^l + defb '0', '1', '2', '3' + defb '4', '5', '6', '7' + defb '8', '9', '-', ',' + defb 0DH, '.' +subttl Cold and Warm boot entry points +page +; Cold boot entry point, set up system pointers and pass control to the CCP +boot: call diskint + xor a ; clear system disk number + ld (4),a + ld a,(ioconfig) ; init value for i/o byte + ld (iobyte),a + call print + defb 1AH, 0DH, 0AH + defb 'KAYPRO II ' + defb 0DH, 0AH + DEFB msize/10+'0', msize mod 10+'0' + defb 'k CP/M v ' + defb vers/10+'0', '.', vers mod 10+'0' + defb 0DH, 0AH, 00H + +goccp: ld a,0C3H ; set up CP/M jumps to bdos and wboot + + ld hl,bios+3 ; wboot entry point + ld (0),a + ld (1),hl + + ld hl,bdos ; entry point to bdos + ld (5),a + ld (6),hl + + ld a,(4) ; last logical disk unit used + ld c,a ; pass to ccp to select + jp ccp ; pass control to ccp + +; Warm boot entry point, re-load the CCP and BDOS +wboot: call diskint + call print + defb 0DH, 0AH, 'Warm Boot', 0DH, 0AH, 00H +wb0: ld sp,100H ; re-set stack + ld c,0 ; select drive A: + call seldsk + ld bc,0 ; set track + call settrk + ld hl,ccp ; first memory location to load + ld (dmaadr),hl + ld bc,nsects*256+1 +wb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + pop bc + or a + jr nz,wb0 ; oops, error on warm boot + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + jp z,goccp ; done loading + inc c ; bump sector count + ld a,trksec ; on to next track? + cp c + jp nz,wb1 + ld c,16 ; first sector on next track + push bc ; save counters + ld c,1 + call settrk ; set track + pop bc + jr wb1 +subttl logical to physical devices CON:, PUN:, RDR:, and LST: +page +; logical devices are con: rdr: pun: and lst: +; physical devices are: +; crt: video and kbd +; tty: serial +; lpt: centronics +; ul1: serial with cts as busy +; pun: same as ul1 +; +;con: tty, crt +;rdr: tty +;pun: tty, pun +;lst: tty, crt, lpt, ul1 + +const: ld a,(iobyte) ; get i/o byte + and 03H ; strip to con bits + ld hl,rom+33H ; serial status + jp z,callrom + ld hl,rom+2AH ; assume CRT + jp callrom + +conin: in a,(bitport) ; turn disk off + bit 6,a + ld hl,rom+27H ; disk off routine + call z,callrom + ld a,(iobyte) + and 03H ; check i/o byte + ld hl,rom+36H ; serial input + jp z,callrom + ld hl,rom+2DH ; assume input from kbd + call callrom ; go get char + or a + ret p ; msb not set +; and 03H ; form table index to vtab + AND 01FH ;FORM TABLE INDEX TO VTAB + ld hl,vtab + ld c,a + ld b,0 + add hl,bc + ld a,(hl) ; pick up xlated character + ret + +conout: ld a,(iobyte) ; check i/o byte + and 03H + ld hl,rom+39H ; serial output + jp z,callrom + ld hl,rom+45H ; assume video + jp callrom + +reader: ld hl, rom+36H ; serial input + jp callrom + +;punch: ld a,(iobyte) ; check i/o byte +; and 30H +; ld hl,rom+39H ; serial punch +; jp z,callrom +; ld hl, rom+42H ; serial with cts as busy +; jp callrom +punch: + ld hl,rom+39h ;serial punch + jp callrom +; + +list: ld a,(iobyte) + and 0C0H ; check i/o byte + ld hl,rom+39H ; serial + jp z,callrom + ld hl,rom+3FH ; centronics + cp 80H + jp z,callrom + ld hl,rom+45H ; video + cp 40H + jp z,callrom +; ld hl, rom+42H ; assume serial with cts as busy + ld hl, rom+39h ;ul1: default to serial + jp callrom + +listst: ld a,(iobyte) ; check i/o byte + and 0C0H + ld hl,rom+42H ; serial + jp z,callrom + ld hl,rom+3CH ; centronics + cp 80H + jp z,callrom + xor a ; 0=ready + ret +subttl Disk I/O and ROM dispatch +page +diskint:ld hl,rom+03H ; re-set disk software sub-system + jr callrom + +home: ld hl,rom+0CH ; home disk drive rom routine + jr callrom + +seldsk: ld hl,rom+0FH ; select disk drive + jr callrom + +settrk: ld hl,rom+12H ; seek track + jr callrom + +setsec: ld hl,rom+15H ; set sector number + jr callrom + +setdma: ld hl,rom+18H ; set dma address + jr callrom + +read: ld hl,rom+1BH ; read a logical sector + jr callrom + +write: ld hl,rom+1EH ; write a logical sector + ld a,(wrtsafe) ; write safe flag + or a ; true or false + jr z,callrom ; normal operation + ld c,1 ; directory write code (forces write op) + jr callrom + +sectran:ld hl,rom+21H ; xlate logical to physical sector + jr callrom + +callrom:exx ; save cp/m arguments + in a,(bitport) ; turn rom on + set 7,a + out (bitport),a + ld (savsp),sp ; save current stack (may be under rom) + ld sp,stack ; set a local stack + ld de,biosret ; rom to "RET" here + push de + exx ; restore cp/m arguments and call loc + jp (hl) ; to rom routine specified in hl +biosret:ex af,af' ; save reg A + ld sp,(savsp) ; restore stack + in a,(bitport) ; off the rom + res 7,a + out (bitport),a + ex af,af' ; restore reg A + ret ; done with rom routine + +print: + ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call conout + jr print + +savsp: defs 2 ; current spact pointer during rom call +stack equ bios+512 ; a local stack + + end + \ No newline at end of file diff --git a/2006/toledo2/TINKER/KBIOS.PRN b/2006/toledo2/TINKER/KBIOS.PRN new file mode 100644 index 000000000..e69de29bb diff --git a/2006/toledo2/TINKER/KPRS2.MAC b/2006/toledo2/TINKER/KPRS2.MAC new file mode 100644 index 000000000..d7a60f9f0 --- /dev/null +++ b/2006/toledo2/TINKER/KPRS2.MAC @@ -0,0 +1,1675 @@ +title KAYPRO RESIDENT SOFTWARE PACKAGE 2.0 , Copyright (C) 1982 NLS, Inc. +subttl Cold start and configure + aseg + ORG 0 +.comment % +######################################################## +## ## +## Cold start routine, reset and configure ## +## system for power up condition. ## +## ## +## Copyright (C) 1982 By Non-Linear Systems, Inc ## +## No warranty is made, expressed or implied. ## +## ## +######################################################## +## Last update: july 13/1982 [001] ## +## by JIM NICKERSON ## +## change list out with busy jump to ## +## to check status of serial port ## +######################################################## +% + .xlist +; extrn stack, diskinit, vidinit, devinit, print, dmaadr, dpha +; extrn home, seldsk, settrk, setsec, setdma, read, write +; extrn sectran, kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; extrn liststat, list, vidout, diskoff, diskon, thnsd + .list + .z80 + +; ROM master jump table + +jp start ; start up computer +jp diskinit ; disk initialize +jp vidinit ; video initialize +jp devinit ; device initialize + +jp home ; home selected disk drive +jp seldsk ; select a disk drive +jp settrk ; seek a track +jp setsec ; set sector number to read +jp setdma ; set dma address +jp read ; read logical sector +jp write ; write logical sector +jp sectran ; xlate sector number +jp diskon ; turn on disk +jp diskoff ; turn off disk + +jp kbdstat ; KeyBoarD character ready +jp kbdin ; input from keyboard +jp kbdout ; output to keyboard (used to ring bell) +jp ttystat ; status of serial input port +jp ttyin ; serial input +jp ttyout ; serial output +jp liststat ; list output status (Centronics) +jp list ; list output +JP TTYOSTAT ;TESTSTATUS OF SERIAL OUTPUT +jp vidout ; video output +jp thnsd ; short delay + +start: di ; stop interupts while setup + ld sp,stack ; rom stack point + ld b,10 ; a delay to let the hardware stabilize + call thnsd + call devinit ; init device sub-system + call vidinit ; init video sub-system + call diskinit ; init disk sub-system + jr bootsys ; boot system + org 66H ; nmi vector + ret ; return from "halt", NMI sequence when in rom +page +; boot system, the first sector (1) of the first track (0) +; hold system boot information. It does NOT hold a short boot routine! +; the image is: +; self: jr self ; hang if booted and run +; defw loadpt ; where to load the opsys image +; defw bios ; where to go after booting system +; defw length ; length of image in 128 byte sectors +; (* the rest of the sector is not used *) +; +; This sector image is loaded and inspected at 0FA00H during the boot process + +crlf equ 0D0AH ; new line codes +esc equ 1BH ; ascii esc +bell equ 07H ; kbd bell + +bootsys:call print + defb esc,'=',20H+10,20H+31 + DEFB '* KAYPRO II *' + defb esc,'=',20H+13,20H+20 + defb 'Please insert your diskette into Drive A',8,0 + ld c,0 + call seldsk ; select disk, set density, do home after diskinit + ld bc,0 ; set track + call settrk + ld c,0 ; read the first sector + call setsec + ld bc,0FA00H ; header sector to go here + call setdma + call read ; read sector to FA00 + di ; read does EI upon exit + or a ; trouble reading? + jr nz,booterr ; tell crt + ld bc,(0FA02H) ; where to load system image + ld (dmaadr),bc + ld bc,(0FA04H) ; where to go after loading system + push bc ; save for latter use + ld bc,(0FA06H) ; length of system in 128 byte sectors + ld b,c ; reg B holds # of sectors to load + ld c,1 ; initial sector (0 was header sector) +cb1: push bc ; save sector count and current sector + call setsec ; select sector + call read + di ; read does EI upon exit + pop bc + or a + jr nz,booterr ; bad read of sector + ld hl,(dmaadr) ; update dma address for next sector + ld de,128 ; new dma address + add hl,de + ld (dmaadr),hl + dec b + ret z ; done booting goto system + inc c ; bump sector count + ld a,40 ; over sectors/track? + cp c + jr nz,cb1 ; fetch another sector + ld c,16 ; first sector to read on next track + push bc ; save counts + ld bc,1 ; set for next track + call settrk + pop bc + jr cb1 + +booterr:call print + defw crlf, crlf + defb bell,'I cannot read your diskette.',0 + call diskoff ; turn off disk drive +self: jr self ; hang till user pushes reset + +page +subttl Disk Equate and Parameters +.comment % +############################################################### +## ## +## Disk support routines (Deblocking) ## +## ## +############################################################### +## Last Update:06/08/82 [001] ## +############################################################### +% +.z80 + .xlist +; extrn sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; extrn sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; extrn unasec, erflag, rsflag, readop, wrtype, dmaadr +; extrn hstbuf, dsk, denflag, tracka, trackb, dirbuf +; extrn csva, alva, csvb, alvb, dpha, dphb, dpbs, dpbd, tbl1 +; extrn move, rd128, rd512, wrt128, wrt512 +; +; public home, seldsk, settrk, setsec, setdma, read, write, sectran +; public diskinit, diskon, diskoff, thnsd + .list + +bitport equ 01CH ; bit port (m80 does not support extrn bytes) +drvmask equ 0FCH ; drive select mask +denmask equ 0DFH ; density bit mask +ddbit equ 00H ; double density bit +sdbit equ 20H ; single density bit +control equ 10H ; I/O port of disk controller +status equ control+0 ; status register +cmnd equ control+0 ; command register +track equ control+1 ; track register +sector equ control+2 ; sector register +data equ control+3 ; data register +ficmd equ 11010000B ; force interrupt (Abort current command) +rdcmd equ 10000000B ; read command +wrtcmd equ 10100000B ; write command +seekcmd equ 00010000B ; seek command +rstcmd equ 00000000B ; home (restore) command +adrcmd equ 11000000B ; read track address +rdmask equ 10011100B ; read status mask +wrtmask equ 11111100B ; write status mask +tries1 equ 4 ; re-home on bad sector # of tries+1 +tries2 equ 15 ; re-read/write # of retries+1 +retcod equ 0C9H ; return op code +nmivec equ 0066H ; non-maskable interupt vector (used in rd/wt loop) +page +; This section defines the disk parameters (dph's are images moved to RAM) +dph0: defw 0,0,0,0 ; dph for unit A: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csva, alva ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + + defw 0,0,0,0 ; dph for unit B: + defw dirbuf,dpbd ; directory buffer, Disk Parameter Block + defw csvb, alvb ; check sum pointer, allocation map pointer + defb ddbit ; density flag for this drive + +;dpbs: ;( single density ); + defw 18 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 82 ; (dsm) max logical block # + defw 31 ; (drm) max directory # + defb 80H ; (al0) directory allocation map + defb 00H ; (al1) + defw 8 ; (cks) size of directory check vector + defw 3 ; (off) reserved tracks +;dpbd: ;( double density ); + defw 40 ; (spt) sectors per track + defb 3 ; (bsh) block shift factor + defb 7 ; (blm) block mask + defb 0 ; (exm) extent mask + defw 194 ; (dsm) max logical block # + defw 63 ; (drm) max directory # + defb 0F0H ; (al0) directory allocation map & BIOS space + defb 00H ; (al1) + defw 16 ; (cks) size of directory check vector + defw 1 ; (off) reserved tracks + +; sector interleave table ( single density ) +;tbl1: + defb 1,6,11,16 + defb 3,8,13,18 + defb 5,10,15,2 + defb 7,12,17,4 + defb 9,14 +enddph: +subttl Logical BIOS entry points & Deblocking +page +.8080 +;***************************************************** +;* Logical BIOS entry points * +;* Sector Deblocking Algorithms * +;***************************************************** +blksiz equ 1024 ;CP/M allocation size +hstsiz equ 512 ;host disk sector size +hstspt equ 10 ;host disk sectors/trk +hstblk equ hstsiz/128 ;CP/M sects/host buff +cpmspt equ hstblk * hstspt ;CP/M sectors/track +secmsk equ hstblk-1 ;sector mask +secshf equ 2 ;log2(hstblk) sector mask +wrall equ 0 ;write to allocated +wrdir equ 1 ;write to directory +wrual equ 2 ;write to unallocated + +single macro lbl + lda denflag + ora a + jnz lbl + endm + +diskinit: ;enter here on system boot to initialize +.z80 + ld hl,ioimage ;move rd/wrt routines into RAM + ld de,move + ld bc,imaglen + ldir + ld hl,dph0 ; set dph's + ld de,dpha + ld bc,enddph-dph0 + ldir +.8080 + xra a ;0 to accumulator + sta hstact ;host buffer inactive + sta unacnt ;clear unalloc count + mvi a,ddbit ;set double density flag + sta denflag + mvi a,255 ;set track numbers to 255 + sta dsk ;clear disk number + sta tracka + sta trackb + ret + +seldsk: ;select disk + mov a,c ;selected disk number + sta sekdsk ;seek disk number + jmp dsksel ;physical disk select (If needed to check den) + +setsec: ;set sector given by register c + mov a,c + sta seksec ;sector to seek + single secset + ret + +.z80 +setdma: ld (dmaadr),bc ;set dma address given by BC + ret + +settrk: ld (sektrk),bc ;set track given by registers BC +.8080 + single trkset + ret + +home: single dohome ; if single goto dohome + lda hstwrt ; patch by DRI + ora a + jnz homed + sta hstact +homed: jmp dohome ; go do home disk drive + +read: ;read the selected CP/M sector + single rd128 ;128 byte sector? + xra a ; a patch by DRI + sta unacnt + mvi a,1 + sta readop ;read operation + sta rsflag ;must read data + mvi a,wrual + sta wrtype ;treat as unalloc + jmp rwoper ;to perform the read + +write: ;write the selected CP/M sector + single wrt128 ;128 byte sector? + xra a ;0 to accumulator + sta readop ;not a read operation + mov a,c ;write type in c + sta wrtype + cpi wrual ;write unallocated? + jnz chkuna ;check for unalloc + +; write to unallocated, set parameters + mvi a,blksiz/128 ;next unalloc recs + sta unacnt + lda sekdsk ;disk to seek + sta unadsk ;unadsk = sekdsk + lhld sektrk + shld unatrk ;unatrk = sectrk + lda seksec + sta unasec ;unasec = seksec + +chkuna: + ;check for write to unallocated sector + lda unacnt ;any unalloc remain? + ora a + jz alloc ;skip if not + +; more unallocated records remain + dcr a ;unacnt = unacnt-1 + sta unacnt + lda sekdsk ;same disk? + lxi h,unadsk + cmp m ;sekdsk = unadsk? + jnz alloc ;skip if not + +; disks are the same + lxi h,unatrk + call sektrkcmp ;sektrk = unatrk? + jnz alloc ;skip if not + +; tracks are the same + lda seksec ;same sector? + lxi h,unasec + cmp m ;seksec = unasec? + jnz alloc ;skip if not + +; match, move to next sector for future ref + inr m ;unasec = unasec+1 + mov a,m ;end of track? + cpi cpmspt ;count CP/M sectors + jc noovf ;skip if no overflow + +; overflow to next track + mvi m,0 ;unasec = 0 + lhld unatrk + inx h + shld unatrk ;unatrk = unatrk+1 + +noovf: + ;match found, mark as unnecessary read + xra a ;0 to accumulator + sta rsflag ;rsflag = 0 + jmp rwoper ;to perform the write + +alloc: + ;not an unallocated record, requires pre-read + xra a ;0 to accum + sta unacnt ;unacnt = 0 + inr a ;1 to accum + sta rsflag ;rsflag = 1 + +;* Common code for READ and WRITE follows *; + +rwoper: + ;enter here to perform the read/write + xra a ;zero to accum + sta erflag ;no errors (yet) + lda seksec ;compute host sector + ora a ;carry = 0 + rar ;shift right + ora a ;carry = 0 + rar ;shift right + sta sekhst ;host sector to seek + +; active host sector? + lxi h,hstact ;host active flag + mov a,m + mvi m,1 ;always becomes 1 + ora a ;was it already? + jz filhst ;fill host if not + +; host buffer active, same as seek buffer? + lda sekdsk + lxi h,hstdsk ;same disk? + cmp m ;sekdsk = hstdsk? + jnz nomatch + +; same disk, same track? + lxi h,hsttrk + call sektrkcmp ;sektrk = hsttrk? + jnz nomatch + +; same disk, same track, same buffer? + lda sekhst + lxi h,hstsec ;sekhst = hstsec? + cmp m + jz match ;skip if match + +nomatch: + ;proper disk, but not correct sector + lda hstwrt ;host written? + ora a + cnz writehst ;clear host buff + +filhst: + ;may have to fill the host buffer + lda sekdsk + sta hstdsk + lhld sektrk + shld hsttrk + lda sekhst + sta hstsec + lda rsflag ;need to read? + ora a + cnz readhst ;yes, if 1 + xra a ;0 to accum + sta hstwrt ;no pending write + +match: + ;copy data to or from buffer + lda seksec ;mask buffer number + ani secmsk ;least signif bits + mov l,a ;ready to shift + mvi h,0 ;double count + dad h ;shift left 7 + dad h + dad h + dad h + dad h + dad h + dad h +; hl has relative host buffer address +.z80 + ld de,hstbuf + add hl,de ;hl = host address + ld de,(dmaadr) ;de = dma address + ld bc,128 ;length + ld a,(readop) ;which way? + or a + jr nz,rwmove ;skip if read + +; write operation, mark and switch direction + ld a,1 + ld (hstwrt),a ;hstwrt = 1 + ex de,hl ;source/dest swap + +rwmove: call move ;move a logical sector to/from buffer + +.8080 +; data has been moved to/from host buffer + lda wrtype ;write type + cpi wrdir ;to directory? + lda erflag ;in case of errors + rnz ;no further processing + +; clear host buffer for directory write + ora a ;errors? + rnz ;skip if so + xra a ;0 to accum + sta hstwrt ;buffer written + call writehst + lda erflag + ret + +;* Utility subroutine for 16-bit compare *; + +sektrkcmp: ;HL = .unatrk or .hsttrk, compare with sektrk +; .z80 +; ld bc,(sektrk) +; or a ; clear carry +; sbc hl,bc ; hl=hl-bc +; ret ; return status + xchg + lxi h,sektrk + ldax d ;low byte compare + cmp m ;same? + rnz ;return if not +; low bytes equal, test high 1s + inx d + inx h + ldax d + cmp m ;sets flags + ret +subttl Physical disk routines +page +.z80 +; select disk drive, C=drive number 0=A:, 1=B: +; return HL=dph for selected drive, or HL=0 for non-existent drive +dsksel: ld hl,0 ; hl = 0 for non-existent drive + ld a,c + cp 2 + ret nc ; drive number >B: + or a ; zero flag set => A: drive else B: drive + ld hl,dpha ; select proper dph for drive + jr z,sel0 + ld hl,dphb +sel0: ld a,(dsk) ; selecting disk already selected? + cp c + ret z ; yes, no further action needed + ld a,c ; save new disk number + ld (dsk),a + or a ; set zero flag if A: drive + push hl ; hl=dph of disk to be selected + ld de,16 ; to density bit in dph + add hl,de + ld a,(hl) ; move into A then store into denflag + ld (denflag),a + ld hl,trackb ;now find proper track(x) + jr z,sel1 + dec hl +sel1: ld a,(hl) ; have we been on the disk we are "leaving" + cp 255 ; if not do not update trackx + jr z,selnot + in a,(track) + ld (hl),a ; save track of disk we are leaving +selnot: ld a,c ; set zero flag if A: drive + or a + ld hl,tracka + jr z,sel2 + inc hl +sel2: ld a,(hl) + out (track),a ; track of disk we are selecting + ex de,hl + pop hl ; address of dph for disk we are selecting +density:cp 255 ; first time for this drive? + ret nz ; need to check density? + call ready ; physical disk select + call home ; seek track 0 + in a,(bitport) ; test double density first + and denmask ; or in density flag + or ddbit ; set density flag + out (bitport),a + call dcheck ; see if we can read address + jr z,dend ; density is double? + in a,(bitport) ; set density flag to single + and denmask + or sdbit + out (bitport),a + call dcheck ; see if we can read address + ret nz ; can't read single or double so don't change + jr dens +dend: push hl ; (* double density *) hl^ to dph + push de + ld de,0 ; no xlate table (done by FORMAT program) + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbd ; double density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,ddbit ; double density bit flag + ld (hl),a + ld (denflag),a + jr den1 ; exit +dens: push hl ; (* single density *) hl^ to dph + push de + ld de,tbl1 ; single density sector xlate table + ld (hl),e ; store table^ into dph + inc hl + ld (hl),d + ld de,9 ; move foward in dph to dpb pointer + add hl,de + ld de,dpbs ; single density dpb + ld (hl),e + inc hl + ld (hl),d + ld de,5 ; to desity flag in dph + add hl,de + ld a,sdbit ; single density bit flag + ld (hl),a + ld (denflag),a +den1: pop de ; restore pointer to dph + pop hl ; pointer to track(x) bios register + in a,(sector) ; update track register + out (track),a + ld (de),a + ret +dcheck: ld a,adrcmd ; get address command + out (cmnd),a ; issue command to controller + call busy ; wait for command done + bit 4,a ; record not found flag + ret ; return status + +; home disk head +dohome: call ready ; make sure drive is on and ready + ld a,rstcmd; restore command + out (cmnd),a; issue command + jr busy ; test and wait for not busy + +; seek track #, BC=Track # +trkset: call ready ; make sure drive is on and ready + ld a,c ; move track number to A + out (data),a ; track # to seek to + ld a,seekcmd ; seek command + out (cmnd),a ; issue command + jr busy ; test and wait for not busy + +; select sector #, BC=Sector # +secset: ld a,c ; move sector number to A + out (sector),a ; to controller register + ret + +; perform logical to physical sector translation. +; logical sector number in BC, table address in DE +; return physical sector number in HL +sectran:ld a,d ; table address 0? + or e + ld h,b ; if so no xlate + ld l,c + ret z + ex de,hl ; table address in hl + add hl,bc ; index by logical sector number + ld l,(hl) + ld h,0 + ret + +; ready disk drive, perform physical disk select, set density bit +ready: push hl ; save hl + push de ; and de + push bc + ld a,ficmd ; abort any controller action + out (cmnd),a + call diskon ; turn drive motor on + ld a,(dsk) ; A=drive # + ld e,a ; save drive # in E + in a,(bitport) ; A=bit port + and 0FCH ; strip current drive bits + or e ; or in requested drive + inc a ; bump, 01=A: 10=B: + and denmask ; set density bit + ld hl,denflag ; hl^ to density bit for this drive + or (hl) + out (bitport),a ; to bit port + pop bc + pop de + pop hl + ret + +; turn disk motor on, delay for drive speed +diskon: in a,(bitport) ; get current drive motor status + bit 6,a ; is motor on? + ret z ; motor on, do nothing + res 6,a ; motor on bit + out (bitport),a ; turn motor on + ld b,50 ; delay + call thnsd + ret + +; turn disk motor off +diskoff:in a,(bitport) + set 6,a ; motor off bit + out (bitport),a + ret +; delay for B th's @ 4Mhz +thnsd: ld de,1670 +tlp: dec de + ld a,d + or e + jp nz,tlp + djnz thnsd + ret + +; check status of controller, wait for command to finish executing +busy: halt ; wait for command done +bsy: in a,(status) ; now wait for not busy + bit 0,a + jr nz,bsy + ret +subttl Writehst and Readhst logical to Physical routines +page +;* WRITEHST performs the physical write to *; +;* the host disk, READHST reads the physical *; +;* disk. *; + +writehst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. write "hstsiz" bytes + ;from hstbuf and return error flag in erflag. + ;return erflag non-zero if error + ld de,tries1*256+tries2 ; retry error counts +wrthst: push de ; save error counts + call hstcom ; set track and sector + call wrt512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,wrthst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr wrthst + +readhst:;hstdsk = host disk #, hsttrk = host track #, + ;hstsec = host sect #. read "hstsiz" bytes + ;into hstbuf and return error flag in erflag. + ld de,tries1*256+tries2 ; retry error counts +rdhst: push de ; save error counts + call hstcom ; set track and sector + call rd512 ; read sector + ld (erflag),a ; error return flag + pop de ; restore error flags + ret z ; good op + dec e ; retry count + jr nz,rdhst ; try again + dec d ; home and reseek count + ret z ; can't recover + call dohome ; re seek + ld e,tries2 ; reset retry count + jr rdhst + +hstcom: ld a,(hstdsk) ; select disk + ld c,a + call dsksel + ld bc,(hsttrk) ; set track to hsttrk + call trkset ; physical seek + ld a,(hstsec) ; set physical sector + ld c,a ; c=sector + call secset + ret +subttl Physical disk I/O, RAM image +page +ioimage: +;move: ; block memory move, turn rom on/off + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + ldir ; move logical sector from hstbuf + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ret ; back to rom + +;rd128: + ld hl,(dmaadr) ; address of operation + ld b,1 ; read a 128 byte sector + jr rd +;rd512: + ld hl,hstbuf + ld b,4 ; read a 512 byte sector +; read a sector, return A=0 for no errors, A=1 for non-recoverable error +; if b=1 128, b=2 256, b=3 384, b=4 512 bytes/sector +rd: ld de,rdmask*256+rdcmd ; d=read status mask, e=read command + jr action + +;wrt128: + ld hl,(dmaadr) + ld b,1 ; write a 128 byte sector + jr wrt +;wrt512: + ld hl,hstbuf + ld b,4 ; write a 512 byte sector +; write a sector, return as per read +wrt: ld de,wrtmask*256+wrtcmd ; d=status mask, e=write command + ;fall through to action + +action: call ready ; make sure drive is on and ready + di ; no interrupts during disk I/O operations + in a,(bitport) ; turn rom off + res 7,a + out (bitport),a + push hl ; save address of disk buffer + ld hl,nmivec ; set up nmi vector + ld a,(hl) ; save current contents + ex af,af' + ld (hl),retcod ; this is a return after HALT in loop + pop hl ; hl = dma address + ld a,b ; sector multiple + ld bc,128*256+data ; b=sector length, c=data port + bit 0,a ; if 0 then 256 or 512 bytes/sector + jr nz,actn ; b set for 128 or 384 bytes/sector + ld b,0 ; b set for 256 or 512 bytes/sector +actn: cp 1 ; compute entry point 1st or 2nd loop + push psw ; save as Z flag + ld a,e ; i/o command + cp wrtcmd ; a write? + jr z,wstart ; start write command + + out (cmnd),a ; fall through to read loop + pop psw + jr z,rl2 +rl1: halt ; wait for controller + ini + jr nz,rl1 +rl2: halt + ini + jr nz,rl2 + jr done ; read loop done, exit + +wstart: out (cmnd),a ; write loop + pop psw + jr z,wl2 +wl1: halt + outi + jr nz,wl1 +wl2: halt + outi + jr nz,wl2 + +done: ex af,af' ; byte at nmi vector address + ld (nmivec),a ; restore it + in a,(bitport) ; turn rom back on + set 7,a + out (bitport),a + ei ; turn interrupts on + call busy ; get status when contoller not busy + and d ; status mask + ret z ; no bit set, return operation ok + ld a,1 ; cp/m error return + ret + +imaglen equ $-ioimage ; length of this image +page +subttl SIO, PIO, and CTC equates +.comment % +############################################################### +## ## +## System device I/O routines for KBD, TTY and LST ## +## ## +############################################################### +## LAST UPDATE: JULY 7,1982 [001] ## +## BY JIM NICKERSON ## +## CHANGED SIOA REGISTER 3 INIT TO AUTO ENABLE ## +## ADDED LIST STATUS FOR THE SERIAL PORT ## +## TTYOUT NOW THE SAME AS OUT WITH STATUS CHK ## +## CHANGE VECTOR PAD MAPING ## +############################################################### +% +.z80 +.xlist +; public kbdstat, kbdin, kbdout, ttystat, ttyin, ttyout, TTYOSTAT +; public liststat, list, devinit + .list + +;*************** +;* sio equates * +;*************** + +sio equ 04H ; base address of sio +sioa0 equ sio+2 ; channel a command/status +sioa1 equ sio+0 ; channel a data +siob0 equ sio+3 ; channel b command/status +siob1 equ sio+1 ; channel b data + +; write registers 0-7 and control bits +; init registers in the following order 0,2,4,3,5,1 + +WR0 equ 0 ; command register, crc reset, reg pointer +; bits 0-2 are register pointers to WRx and RRx +; bits 3-5 and commands as given bellow +null equ 0 ; null command +extrset equ 10H ; reset ext/status interrupts +reset equ 18H ; channel reset +ienrc equ 20H ; Enable Int on Next Rx Character +rtip equ 21H ; reset transmitter interrupt pending +errset equ 30H ; error reset +retint equ 31H ; return from interrupt + +WR1 equ 1H ; interrupt enable and Wait/Ready modes +esie equ 1H ; external/status interrupt enable +tie equ 2H ; transmitter interrupt enable +tid equ 0 ; transmitter interrupt disable +statav equ 4H ; Status affects vector (z80 mode 2) (see WR2) +; bits 3-4 affect receive interrupt mode +rid equ 0 ; receive interrupts disabled +rifc equ 8H ; receive interrupt on first char only +riep equ 10H ; recv interrupts enabled, parity err Special Recv Cond +rie equ 18H ; same as riep but parity error not Special Recv Cond + +WR2 equ 2 ; interrupt vector address/pointer (chan b only) +; interrupt address (z80 reg I+WR2=interrupt address) +; returned as is if not statav above in wr1 +; if statav then bits 1-3 are modified as bellow: +; 000 ch b transmit buffer empty +; 001 ch b external/status change +; 010 ch b receive char available +; 011 ch b special receive condition (parity error, Rx overrun, +; framing error, end of frame(sdlc) ) +; 1xx ch a (* same vectors as for channel b above *) + +WR3 equ 3 ; receiver logic control and parameters +re equ 1 ; receiver enable +autoe equ 20H ; auto enable (use dcd and cts to enable recv and xmt +; bits 6-7 are receiver bits/character +rbits5 equ 0 ; 5 bits/character +rbits7 equ 40H ; 7 bits/character +rbits6 equ 80H ; 6 bits/character +rbits8 equ 0C0H ; 8 bits/character + +WR4 equ 4 ; control bits that affect both xmt and recv +pon equ 1 ; enable parity (parity on) +pstate equ 2 ; parity even not pstate = parity odd +; bits 2-3 are number of stop bits +syncmd equ 0 ; sync mode is to be selected +sbits1 equ 4 ; 1 stop bit +sbits5 equ 8H ; 1.5 stop bits +sbits2 equ 0CH ; 2 stop bits +; bits 6-7 control clock rate +cr1 equ 0 ; data rate x1=clock rate +cr16 equ 40H ; x16 +cr32 equ 80H ; x32 +cr64 equ 0CH ; x64 + +WR5 equ 5 ; control bits that affect xmt +te equ 8H ; transmit enable +break equ 10H ; send break +; bits 5-6 are number of bits/character to transmit +tbits5 equ 0 ; 5 or less bits/character +tbits7 equ 20H ; 7 bits/character +tbits6 equ 40H ; 6 bits/character +tbits8 equ 60H ; 8 bits/character +rts equ 2 ; RTS output +dtr equ 80H ; DTR output + +WR6 equ 6 ; sdlc transmit sync character +WR7 equ 7 ; sdlc receive sync character + +; read registers 0-2 and status bits +rr0 equ 0 ; general recv and xmt status +rca equ 1 ; receive character available +intped equ 2 ; interrupt pending (ch a only) +tbe equ 4 ; transmit buffer empty +synhnt equ 10H ; sync/hunt +dcd equ 8H ; DCD input +cts equ 20H ; CTS input +xmtundr equ 40H ; transmit underrun/ EOM +brk equ 80H ; break/abort status + +rr1 equ 1 ; Special Receive conditions and Residue codes +; bits 4-7 are special receive conditions +rpe equ 10H ; parity error +rovr equ 20H ; Rx overrun error +framerr equ 40H ; framing error + +rr2 equ 2 ; interrupt vector address/pointer + +;*************** +;* pio equates * +;*************** + +pio equ 08H ; base address of pio +pioac equ pio+1 ; pio a control +pioad equ pio+0 ; pio a data +piobc equ pio+3 ; pio b control +piobd equ pio+2 ; pio b data + +spio equ 01CH ; base address of pio (system status bits port) +spioac equ spio+1 ; pio a control +spioad equ spio+0 ; pio a data +spiobc equ spio+3 ; pio b control +spiobd equ spio+2 ; pio b data + +bitport equ spioad ; system bit port for status and control +;0 drive sel A: +;1 drive sel B: +;2 n/c +;3 centronics i/o ready line +;4 centronics i/o data strobe +;5 single density (not 5 is double density) +;6 drive motor off (not 6 is motor on) +;7 rom enable (not 7 is rom off) + +; control register +setiv equ 0 ; set interrupt vector, bits 1-7 are vector address + +som equ 0FH ; set operating mode. bits 6-7 specify mode +mode0 equ 0 ; output +mode1 equ 40H ; input +mode2 equ 80H ; bidirectional +mode3 equ 0C0H ; control (bit by bit i/o, mode3 command is followed by + ; byte where bit pattern specifies i/o bits + ; 1=input, 0=output + +sicw equ 7H ; set interrupt control word, bits 4-7 are parameters +imask equ 10H ; bit mask follows ) +hghlow equ 20H ; high/low ) mode 3 only +andor equ 40H ; and/or of bits to gen interrupt ) +intena equ 80H ; enable interrupt (bit low disable interrupts) + +intcmd equ 03H ; set interrupt enable/disable without changing status as sicw + +;*************** +;* ctc equates * +;*************** + +ctc equ 18H ; ctc base address +ctc0 equ ctc+0 ; ctc channel 0 +ctc1 equ ctc+1 ; ctc channel 1 +ctc2 equ ctc+2 ; ctc channel 2 +ctc3 equ ctc+3 ; ctc channel 3 + +; channel control register bits +ctccmd equ 01H ; ctc command byte +ctcint equ 80H ; interrupt enable +ctcm1 equ 40H ; set ctc mode is counter +ctcm0 equ 00H ; set ctc mode is timer +range equ 20H ; timer prescaler factor is 256 (not range is 16) +slope equ 10H ; edge triger positive (not slope is negative edge) +trigger equ 8H ; ext trigger +ltc equ 4H ; load time constant (followed by time constant) +rsetctc equ 2H ; reset channel + +ctcivec equ 0 ; set ctc interrupt vector, bits 3-7 are vector addr +ctcvmsk equ 0F8H ; interrupt vector mask to strip bits 0-2 + +;*************** +;* baud rate * +;*************** + +bauda equ 00H ; baud rate generator for serial chan a +baudb equ 0CH ; baud rate generator for serial chan b + +; baud rate factors, output to baudx to select baud rate +baud10 equ 02H ; 110 baud rate +baud30 equ 05H ; 300 baud rate +baud12 equ 07H ; 1200 baud rate +baud24 equ 0AH ; 2400 baud rate +baud48 equ 0CH ; 4800 baud rate +baud96 equ 0EH ; 9600 baud rate +baud19k equ 0FH ; 19.2k baud rate +subttl I/O configuration tables +page +iotabint: ; i/o device initialization table + ; first byte is port # + ; second byte is byte to send to port + defb (iotblend-iotabint)/2 ; table length in arguments + +; init sio channel b +defb siob0, reset ; reset sio channel +defb baudb, baud30 ; 300 baud +defb siob0, wr4 +defb siob0, sbits1 or cr16 ; one stop bit, 16x clock +defb siob0, wr3 +defb siob0, re or rbits8 ; recv enable, 8 bits/char +defb siob0, wr5 +defb siob0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb siob0, wr1 +defb siob0, tid or rid ; xmt & recv interrupts disabled + +; init sio channel a +defb sioa0, reset ; reset sio channel +defb bauda, baud30 ; 300 baud +defb sioa0, wr4 +defb sioa0, sbits1 or cr16 ; one stop bit, 16x clock +defb sioa0, wr3 +defb sioa0, re or rbits8 or autoe ; recv enable, 8 bits/char, auto enable +defb sioa0, wr5 +defb sioa0, te or tbits8 or dtr ; xmt enable, 8bits/char, assert dtr +defb sioa0, wr1 +defb sioa0, tid or rid ; xmt & recv interrupts disabled + +; init pio used form system control bits +defb spioac, intcmd ; disable interrupts +defb spioad, 10000001B ; set system status bits (before setting mode!) +defb spioac, som or mode3 ; set mode to #3 +defb spioac, 00001100B ; bit pattern for mode 3 + +; init pio used to drive printer +defb pioac, intcmd ; disable interrupts +defb pioac, som or mode0 ; set mode to #0 (output) +defb piobc, intcmd ; disable interrupts +defb piobc, som or mode1 ; set mode to #1 (input) +iotblend: ; end of table + +devinit:ld hl,iotabint ; initialize i/o devices + ld b,(hl) ; number of bytes to send to i/o devices +iolp: inc hl + ld c,(hl) ; port to send + inc hl + ld a,(hl) ; byte to send + out (c),a + djnz iolp + ret ; done +subttl Device I/O handlers +page +kbdstat:in a,(siob0) ; kbd char avail? + and rca + ret z ; 0=no char + ld a,0FFH ; FF=char avail + ret + +kbdin: call kbdstat ; loop till char avail + jr z,kbdin + in a,(siob1) ; get char + call kbdmap ; map out funny chars of vector pad and #'s + ret + +kbdout: in a,(siob0) ; xmit buffer empty? + and tbe + jr z,kbdout + ld a,c ; out character + out (siob1),a + ret + +kbdmap: ld hl,mapin ; input map table + ld bc,mapout-mapin ; table length + cpir ; search table + ret nz ; not found + ld de,mapin ; make hl=table index + or a ; hl-mapin=index + sbc hl,de + ld de,mapout-1 ; index + add hl,de + ld a,(hl) ; get char from mapout + ret + +mapin: defb 0F1H, 0F2H, 0F3H, 0F4H ; up, down, left, right arrows + defb 0B1H, 0C0H, 0C1H, 0C2H ; 0,1,2,3 + defb 0D0H, 0D1H, 0D2H, 0E1H ; 4,5,6,7 + defb 0E2H, 0E3H, 0E4H, 0D3H ; 8,9, '-', ',' + defb 0C3H, 0B2H ; return, '.' + defb 0FFH ; end of mapin table +mapout: defb 80H, 81H, 82H, 83H ; vector pad, xlate in bios + defb 84H, 85H, 86H, 87H + defb 88H, 89H, 8AH, 8BH + defb 8CH, 8DH, 8EH, 8FH + defb 90H, 91H + +ttystat:in a,(sioa0) ; serial port status input + and rca + JR COMOUT + +ttyin: call ttystat ; is a char ready? + jr z,ttyin + in a,(sioa1) + ret + +ttyout: in a,(sioa0) ; output a char to serial port + and tbe + jr z,ttyout ; xmit buffer full? + ld a,c + out (sioa1),a ; xmit character + ret + +; +TTYOSTAT: ;TEST STATUS OF SERIAL OUTPUT + IN A,(SIOA0) + AND TBE ;TX BUF FULL ? + JR COMOUT +; +; list port centronics equates +pready equ 3 ; bit in bit port +pstrob equ 4 ; bit in bit port + +liststat:in a,(bitport) ; centronics printer port status + bit pready,a +COMOUT: ret z ; 0=busy + ld a,0FFH ; FF=ready + ret + +list: call liststat ; is printer busy? + jr z,list + ld a,c + out (pioad),a ; output char to printer + in a,(bitport) ; strb. printer + set pstrob,a + out (bitport),a + res pstrob,a + out (bitport),a + ret + +page +subttl Memory maped video output driver +.comment % +################################################################## +## ## +## Memory maped video output driver ## +## ## +################################################################## +## Last Update : july 13 1982 ## +## by jim nickerson ## +################################################################## +% +; +.xlist +; extrn leadflg, row, cursor, chrmsk, kbdout +; public vidout, vidinit, print +.list + +.z80 +jmpif macro j,k ;SHORT JUMP + cp j + JR z,k + endm +; +LJMPIF macro j,k ;LONG JUMP + cp j + jp z,k + endm + + +colcp macro x + ld a,l + and not colum-1 + cp x + endm + +SPACE equ 20H ; space char +cr equ 0DH ; move cursor to beginning of line +bs equ 08H ; move cursor left (control h) +fs equ 0CH ; move cursor right (control l) +lf equ 0AH ; move cursor down (control j) +rlf equ 0BH ; move cursor up (control k) +eol equ 18H ; clear to end of line (control x) +eos equ 17H ; clear to end of screen (control w) +clr equ 1AH ; clear screen char (control z) +homec equ 1EH ; home cursor +esc equ 1BH ; escape, lead-in character +bell equ 07H ; ascii bell +curchr equ '_' or 80H ; character for cursor +ascii equ 7FH ; ascii mask +greek equ 1FH ; greek character set mask + +base equ 03000H ;start of video ram +linlen equ 80 ;logical line length +colum equ 128 ;physical line length +lines equ 24 ;lines per display +line1 equ base ;start of first line +line2 equ base+colum ;start of second line +last1 equ base+(lines-1)*colum ;start of last line +last equ (base+lines*colum)-1 ;last char of display +bitport equ 1CH ;system bit port + +vidinit:ld a,space ; clear row # + ld (row),a + call clear ; clear screen and home cursor + ld (cursor),hl + xor a + ld (leadflg),a ; no leadin sequence + ld a,17H ; re-set scroll register + out (14H),a + ld a,ascii ; set ascii mask + ld (chrmsk),a + ret + +vidout: + ld a,(leadflg) ; processing a lead-in sequence? + or a + jp nz,leadin + ld a,bell ; ring bell, no display? + cp c + JR nz,nobell + ld c,04H ; kbd bell code + jp kbdout ; ring bell + +nobell: call clrcur ; clear (remove) cursor + ld de,finsh ; set up return to finish + push de + ld a,c ; char to print + jmpif lf,lfcd ; line feed (down arrow) + LJMPIF cr,return ; return + jmpif bs,back ; back space (left arrow) + jmpif fs,fowrd ; right arrow + jmpif rlf,up ; up arrow + LJMPIF esc,doesc ; lead-in + LJMPIF eol,cleol ; clear to eol + jmpif eos,cleos ; clear to eos + jmpif clr,clear ; clear screen, home currsor + jmpif homec,hmcsr ; home cursor + cp 60H ; lower case? + jr c,vout + ld a,(chrmsk) ; if lower do we print greek chr set? + and c +vout: ld (hl),a ; display character + inc hl ; inc cursor position + ld a,l ; off end of line? + and not colum + cp linlen ; logical line length + ret c ; not past colum-1 + call return + jr lfcd + +vovr: ld de,last ; off display memory? + ld a,d + cp h + jr c,scroll + ret nz + ld a,e + cp l + ret nc +scroll: ld b,lines-1 ; number of lines to scroll + ld hl,line2 + ld de,line1 +scr1: push bc ; save line count + ld bc,linlen ; logical line length + ldir ; scroll one line + ld bc,colum-linlen ; to beginning of next line + add hl,bc + ex de,hl + add hl,bc + ex de,hl + pop bc ; line count + djnz scr1 ; do another line + ld hl,last1 ; to last line of display + JR cleol ; clear it + +; +; process a line feed (cursor down) +; +lfcd: ld de,colum ; to next line, same column + add hl,de + JR vovr +; +; back space the cursor +; +back: ld a,l ; is column # 0? + and not colum + ret z ; at beginning of line + dec hl ; back space + ret +; +; move cursor foward +; +fowrd: ld a,l ; right most column? + and 07FH ;INSTEAD OF not colum-1 + cp 79 + ret nc + inc hl ; bump cursor address + ret +; +; move cursor up one line +; +up: push hl ; save current position + ld de,-colum ; move up one line + add hl,de + push hl ; save new cursor position + or a ; clear carry + ld de,line1 ; first char of display + sbc hl,de ; if carry set we are off display + pop hl ; hl = new pos + pop de ; de = old pos + ret nc + ex de,hl + ret +; +; clear screen +; +clear: ld hl,line1 ; clear screen + ld de,line1+1 + ld bc,last-base + ld (hl),space + ldir + ld hl,line1 ; home cursor + ret +; +; home cursor +; +hmcsr: ld hl,line1 ; line one of display + ret +; +; clear to end of screen +; +cleos: +; patch by jim + push hl ;save current position + call cleol + ld de,colum + ld a,l + and 080H + ld l,a + add hl,de ;begining of next line + ld a,03CH ;after last line now ? + cp h ;h holds page (3B) is last line + jr z,cleos1 ;yes so no more to blank get out +; + ld e,l ; copy hl to de + ld d,h + or a ; clear carry + ld hl,last ; last pos of screen + sbc hl,de ; last-current position + ld c,l ; move count to bc + ld b,h + ld h,d ; move current position into hl + ld l,e + inc de + ld (hl),space + ldir +; +;patch by jim +cleos1: +; + pop hl ; restore cursor position + ret +; +; clear to end of line +; +cleol: +; +;patch by jim +; + ld a,l + and 07FH + cp linlen-1 + jr c,cleol1 + ld (hl),space + ret +cleol1: +; +; + push hl ; save current position + push hl + ld a,l ; find beginning of line + and not colum-1 + ld l,a +; +;patch by jim + ld de,linlen-1 +; + add hl,de ; hl points to end of line + pop de ; current position in de + push de + or a ; clear carry + sbc hl,de ; hl=# of bytes to clear + ld c,l ; move count into bc + ld b,h + pop hl ; current position + ld e,l ; copy to de + ld d,h + inc de + ld (hl),space + ldir + pop hl ; restore cursor address + ret + +clrcur: ld hl,(cursor) ; get cursor location + ld a,(hl) ; undo cursor + cp curchr ; is it a cursor on a blank field? + ld a,space + jr nz,clr1 + ld (hl),a +clr1: res 7,(hl) ; undo cursor + ret +; +; process a return +; +return: ld a,l + and not colum-1 + ld l,a + ret +; +; escape lead-in sequence start up +; +doesc: ld a,1 ; leadflg is a counter of chars processed + ld (leadflg),a + ret +; +; process second, third and fourth characters of lead-in sequence +; +leadin: ld hl,exit ; fake ret to exit + push hl + ld hl,leadflg + ld (hl),0 ; clear lead-in counter in case error + cp 1 ; second char? (leadflg=1 processed first char) + jr nz,l1 + ld a,c ; what type of esc sequence? + res 7,a + cp 'G' ; greek character set? + jr z,dogreek + cp 'A' ; ascii character set? + jr z,doascii + cp 'R' ; delete line? + jr z,dodel + cp 'E' ; insert line? + jr z,doinst + cp '=' ; esc = sequence (cursor positioning) + ret nz ; error, exit + ld (hl),2 ; have processed second character of sequence + ret +l1: cp 2 ; third character? + jr nz,l2 + ld a,c ; row number+space + ld (row),a ; save for later use + ld (hl),3 ; have processed third character + ret +l2: cp 3 ; fourth character? + ret nz ; error, leadflg trashed by someone + + call clrcur ; remove cursor then move it + pop hl ; ret to exit not needed + ld hl,line1 ; process col # + ld a,c + sub ' ' ; remove ascii space bias +;patch by jim +; +l3: sub linlen +; + jr nc,l3 + add a,linlen + ld l,a + ld a,(row) + sub ' ' ; remove ascii space bias +l4: sub lines ; range 0 - lines + jr nc,l4 + add a,lines + ld de,colum ; add column to cursor pos till +l5: jp z,finsh ; # lines = 0 + add hl,de + dec a + jr l5 +; +FINSH: LD A,(HL) ; MAKE A CURSOR + CP SPACE ; SPACE + JR NZ,FIN1 ; IF SO THEN SPECIAL CURSOR CHAR + LD A,CURCHR +FIN1: SET 7,a + ld (hl),a + ld (cursor),hl ; save location +exit: ret ; all done + +; +; switch from ascii to greek +; +dogreek:ld a,greek ; greek char mask + ld (chrmsk),a + ret +; +; switch from greek to ascii +; +doascii:ld a,ascii ; ascii mask + ld (chrmsk),a + ret +; +; delete line, scroll up to current line, blank 24'th line +; +dodel: pop hl ; ret to exit not needed + call setup ; setup cpu regs for ldir + push de ; current line + jr z,delscr ; if setup set Z flag no scroll + ldir +delscr: ld hl,last1 ; blank last line + call cleol + pop hl ; current line + JR finsh +; +; insert a blank line at current row address, 24'th line lost +; +doinst: pop hl ; ret to exit not needed + call setup + push de ; current line + jr z,inscr ; no scroll + ld de,last1+127 + ld hl,last1-1 + lddr +inscr: pop hl ; current line + push hl + call cleol ; clear it + pop hl ; current row, colum=0 + JR finsh + +setup: call clrcur ; get current cursor position + call return ; to beginning of line + push hl ; save it + ex de,hl ; compute amount to move + ld hl,last1 ; last line of display + or a + sbc hl,de + ld b,h ; bc=length + ld c,l + pop hl ; current pos + push hl + ld de,128 ; set a pointer to beginning of next line + add hl,de ; hl=current+128 (next line) + pop de ; de=current + ld a,b ; is bc zero + or c + ret + +print: ex (sp),hl ; pop return address, points to text to print + ld a,(hl) ; get a byte of text, stop on zero byte + inc hl + ex (sp),hl ; save new return address + or a ; is it a zero byte? + ret z + ld c,a ; no, so print it + call vidout + jr print + defb 0FFH ; because L80 tends to drop the last byte + +page +subttl RAM storage +.comment % +############################################################### +## ## +## System scratch RAM used by ROM software ## +## ## +############################################################### +## Last Update:05/31/82 [001] ## +############################################################### +% +.z80 +.xlist +; public sekdsk, sektrk, seksec, hstdsk, hsttrk, hstsec +; public sekhst, hstact, hstwrt, unacnt, unadsk, unatrk +; public unasec, erflag, rsflag, readop, wrtype, dmaadr +; public hstbuf, dsk, denflag, tracka, trackb, dirbuf, move +; public csva, alva, csvb, alvb, dpha, dphb, rd128, rd512 +; public leadflg, row, cursor, chrmsk, wrt128, wrt512, stack +; public dpbs, dpbd, tbl1, tbl2 +.list + +ramscratch equ 0FC00H ; scratch ram + +sekdsk equ ramscratch ;seek disk number +sektrk equ sekdsk+1 ;seek track number +seksec equ sektrk+2 ;seek sector number +hstdsk equ seksec+1 ;host disk number +hsttrk equ hstdsk+1 ;host track number +hstsec equ hsttrk+2 ;host sector number +sekhst equ hstsec+1 ;seek shr secshf +hstact equ sekhst+1 ;host active flag +hstwrt equ hstact+1 ;host written flag +unacnt equ hstwrt+1 ;unalloc rec cnt +unadsk equ unacnt+1 ;last unalloc disk +unatrk equ unadsk+1 ;last unalloc track +unasec equ unatrk+2 ;last unalloc sector +erflag equ unasec+1 ;error reporting +rsflag equ erflag+1 ;read sector flag +readop equ rsflag+1 ;1 if read operation +wrtype equ readop+1 ;write operation type +dmaadr equ wrtype+1 ;last dma address +hstbuf equ dmaadr+2 ;host buffer +dsk equ hstbuf+512 ; current disk drive +denflag equ dsk+1 ; density flag for current drive +tracka equ denflag+1 ; track of disk A (255=density unknown) +trackb equ tracka+1 ; track of disk B +csva equ trackb+1 ; directory check +alva equ csva+16 ; allocation map +csvb equ alva+25 +alvb equ csvb+16 +leadflg equ alvb+25 ; video leadin sequence count +row equ leadflg+1 ; temp store of rom number +cursor equ row+1 ; cursor address +chrmsk equ cursor+2 ; ascii/greek character set switch +dpha equ chrmsk+1 ; DPH for A +dphb equ dpha+17 ; DPH for B +dpbs equ dphb+17 ; single density dpb +dpbd equ dpbs+15 ; double density dpb +tbl1 equ dpbd+15 ; single density skew table +tbl2 equ tbl1+18 ; 512 byte sector skew table +move equ tbl2+10 ; move logical sector from hstbuf +rd128 equ move+15 ; routine to read 128 byte sector +rd512 equ rd128+7 ; routine to read 512 byte sector +wrt128 equ rd512+10 ; routine to write 128 byte sector +wrt512 equ wrt128+7 ; routine to wrtie 512 byte sector +rdwrtend equ rd128+150 ; end of read and write routines +dirbuf equ rdwrtend+1 ; bdos directory buffer + +stack equ 0FFFFH ; boot up stack space + end + \ No newline at end of file diff --git a/2006/toledo2/WASH.COM b/2006/toledo2/WASH.COM new file mode 100644 index 000000000..fa6ee3176 Binary files /dev/null and b/2006/toledo2/WASH.COM differ diff --git a/2006/toledo2/WS33-1/PIP.COM b/2006/toledo2/WS33-1/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/WS33-1/PIP.COM differ diff --git a/2006/toledo2/WS33-1/WINSTALL.COM b/2006/toledo2/WS33-1/WINSTALL.COM new file mode 100644 index 000000000..4734c1031 Binary files /dev/null and b/2006/toledo2/WS33-1/WINSTALL.COM differ diff --git a/2006/toledo2/WS33-1/WS.INS b/2006/toledo2/WS33-1/WS.INS new file mode 100644 index 000000000..fba431c0e Binary files /dev/null and b/2006/toledo2/WS33-1/WS.INS differ diff --git a/2006/toledo2/WS33-2/PIP.COM b/2006/toledo2/WS33-2/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/WS33-2/PIP.COM differ diff --git a/2006/toledo2/WS33-2/PRINT.TST b/2006/toledo2/WS33-2/PRINT.TST new file mode 100644 index 000000000..4968b9935 Binary files /dev/null and b/2006/toledo2/WS33-2/PRINT.TST differ diff --git a/2006/toledo2/WS33-2/TYPEME b/2006/toledo2/WS33-2/TYPEME new file mode 100644 index 000000000..aa7d533b9 --- /dev/null +++ b/2006/toledo2/WS33-2/TYPEME @@ -0,0 +1,13 @@ + +WHEN USING MICROPRO PRODUCTS ON THE DEC VT-18X COMPUTER, + +BE SURE NOT TO USE ^S (PRESSING THE 'S' KEY WHILE HOLDING + +THE 'CTRL' KEY DOWN). THIS WILL CAUSE ALL SCREEN OUTPUT TO + +HALT UNTIL ^Q IS TYPED. INSTEAD OF ^S, USE THE LEFT ARROW + +KEY (IF IT GENERATES ^S OR ^H) OR THE BACKSPACE KEY TO MOVE + +THE CURSOR LEFT. + \ No newline at end of file diff --git a/2006/toledo2/WS33-2/WSMSGS.OVR b/2006/toledo2/WS33-2/WSMSGS.OVR new file mode 100644 index 000000000..b4fb5b598 Binary files /dev/null and b/2006/toledo2/WS33-2/WSMSGS.OVR differ diff --git a/2006/toledo2/WS33-2/WSOVLY1.OVR b/2006/toledo2/WS33-2/WSOVLY1.OVR new file mode 100644 index 000000000..f041dad8f Binary files /dev/null and b/2006/toledo2/WS33-2/WSOVLY1.OVR differ diff --git a/2006/toledo2/WS33-2/WSU.COM b/2006/toledo2/WS33-2/WSU.COM new file mode 100644 index 000000000..e3e24dbd2 Binary files /dev/null and b/2006/toledo2/WS33-2/WSU.COM differ diff --git a/2006/toledo2/WS33-KPR/PIP.COM b/2006/toledo2/WS33-KPR/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/WS33-KPR/PIP.COM differ diff --git a/2006/toledo2/WS33-KPR/PRINT.TST b/2006/toledo2/WS33-KPR/PRINT.TST new file mode 100644 index 000000000..202e46170 --- /dev/null +++ b/2006/toledo2/WS33-KPR/PRINT.TST @@ -0,0 +1,121 @@ +.cw12 +.hå (Thió texô ió á printouô oæ thå filå nameä PRINT.TST) +.fï WordStaò Overvie÷ Pagå # + + Welcome_to_WordStar* + +WordStar‚  ió  á powerfuì worä processinç systeí designeä tï  meeô � +texô preparatioî requirementó foò alì leveló oæ usersº + + * professional writers + * programmers + * text editors + * office administrators + * clerical staff + * students + + SPECIAL PRINTING CAPABILITIES INCLUDE: + + * Boldface¬  Doublå  Strike¬  Underline“  + + * Strikeout¬ Overprint (co^te) + + * SUPERScript + + * SUBScript + + * and any combination -- WordStar + + +On-screen printer-image text formatting commands include + Automatic-Centering‚ +whicè  allowó texô tï bå automaticallù centereä oî á linå witè  á � +two-strokå  command®  + + Margiî settingó caî bå changed¬ anä � +                              thå   reformatteä   texô  wilì   bå � +                              displayeä oî command® +                               +                              Selectivå    margination‚    permitó � +                              "cutting¢ arounä aî illustration® + +Á  widå rangå oæ letteò qualitù anä drafô printeró arå  supporteä � +(includinç Diablo¬  NEC¬  Qume¬  Epsoî anä  Olivetti)®  WordStar� +fullù utilizeó bidirectionaì printinç capability® + +Somå  printeró  wilì  supporô  WordStar„  commandó  whicè  specifù � +variablå linå heighô anä variablå anä alternatå characteò pitch. + +(The examples below will not be demonstrated by all printers.) + +.CW19 +This is an example of variable pitch. (.CW 19) +.CW15 +This is an example of variable pitch. (.CW 15) +.CW12 +This is an example of variable pitch. (.CW 12) +.CW11 +This is an example of variable pitch. (.CW 11) +.CW10 +This is an example of variable pitch. (.CW 10) + +.cw12 +* WordStar„  ió  á registereä trademarë oæ MicroPrï  Internationaì � +  Corporation. Š.LH 20 + This is an example of variable line height. (.LH 20) +.LH 18 + This is an example of variable line height. (.LH 18) +.LH 16 + This is an example of variable line height. (.LH 16) +.LH 14 + This is an example of variable line height. (.LH 14) +.LH 12 + This is an example of variable line height. (.LH 12) +.LH 10 + This is an example of variable line height. (.LH 10) +.LH 8 + This is an example of variable line height. (.LH 8) +.LH 6 + This is an example of variable line height. (.LH 6) +.LH 8 + +Daisù  wheeì  printeró  caî alsï bå seô tï "toggle¢  betweeî  thå � +standard 10-pitch and alternate 12-pitch printing: + + This sentence is printed with the normal 10-pitch setting, + then toggled to 12-pitch, then back to normal. + + +Tï  seå  thå embeddeä commandó whicè produceä thió  text¬  follo÷ � +thió procedure: + + - Iî responså tï thå basiã prompô froí youò system¬ enter + +        wó  + + - Wheî  thå  Openinç Menõ appearó oî  youò  screen¬  typå  D‚ � +       (ord©  tï  ediô á document®  Then¬  iî responså  tï  thå � +       requesô foò filå name¬ type + + print.tst  + +Thå  firsô  thinç yoõ wilì noticå ió thaô thå texô oî thå  screeî � +includeó somå characteró whicè dï noô appeaò oî thå printeä copy® � +Foò example: + + ï thå headinç linå ió identifieä bù á doô command¬ .hå + + o words in boldface are marked by "^B" + +Tï  continuå  viewinç PRINT.TSÔ oî youò screen¬  trù eacè oæ  thå � +followinç commandó tï scrolì througè thå file: + + CTRÌ Ã tï vie÷ thå NEXÔ fulì seô oæ lines + + CTRÌ Ò tï vie÷ thå PRECEDINÇ fulì seô oæ lines + + NOTEº Holä dowî thå CTRÌ keù whilå yoõ presó thå nexô key. + +Wå  thinë yoõ wilì finä WordStaò aî easy-to-use¬  essentiaì  tooì � +foò alì youò texô processinç needs® + \ No newline at end of file diff --git a/2006/toledo2/WS33-KPR/WINSTALL.COM b/2006/toledo2/WS33-KPR/WINSTALL.COM new file mode 100644 index 000000000..4734c1031 Binary files /dev/null and b/2006/toledo2/WS33-KPR/WINSTALL.COM differ diff --git a/2006/toledo2/WS33-KPR/WS.INS b/2006/toledo2/WS33-KPR/WS.INS new file mode 100644 index 000000000..aabf07501 Binary files /dev/null and b/2006/toledo2/WS33-KPR/WS.INS differ diff --git a/2006/toledo2/WS33-KPR/WSMSGS.OVR b/2006/toledo2/WS33-KPR/WSMSGS.OVR new file mode 100644 index 000000000..b4fb5b598 Binary files /dev/null and b/2006/toledo2/WS33-KPR/WSMSGS.OVR differ diff --git a/2006/toledo2/WS33-KPR/WSOVLY1.OVR b/2006/toledo2/WS33-KPR/WSOVLY1.OVR new file mode 100644 index 000000000..962fb5390 Binary files /dev/null and b/2006/toledo2/WS33-KPR/WSOVLY1.OVR differ diff --git a/2006/toledo2/WS33-KPR/WSU.COM b/2006/toledo2/WS33-KPR/WSU.COM new file mode 100644 index 000000000..5f7ac25b1 Binary files /dev/null and b/2006/toledo2/WS33-KPR/WSU.COM differ diff --git a/2006/toledo2/WS33/MAILMRGE.OVR b/2006/toledo2/WS33/MAILMRGE.OVR new file mode 100644 index 000000000..a5a72aa5b Binary files /dev/null and b/2006/toledo2/WS33/MAILMRGE.OVR differ diff --git a/2006/toledo2/WS33/PIP.COM b/2006/toledo2/WS33/PIP.COM new file mode 100644 index 000000000..85e14cc1a Binary files /dev/null and b/2006/toledo2/WS33/PIP.COM differ diff --git a/2006/toledo2/WS33/WINSTALL.COM b/2006/toledo2/WS33/WINSTALL.COM new file mode 100644 index 000000000..4734c1031 Binary files /dev/null and b/2006/toledo2/WS33/WINSTALL.COM differ diff --git a/2006/toledo2/WS33/WS.COM b/2006/toledo2/WS33/WS.COM new file mode 100644 index 000000000..2a2975d61 Binary files /dev/null and b/2006/toledo2/WS33/WS.COM differ diff --git a/2006/toledo2/WS33/WS.INS b/2006/toledo2/WS33/WS.INS new file mode 100644 index 000000000..7454d236b Binary files /dev/null and b/2006/toledo2/WS33/WS.INS differ diff --git a/2006/toledo2/WS33/WSMSGS.OVR b/2006/toledo2/WS33/WSMSGS.OVR new file mode 100644 index 000000000..b4fb5b598 Binary files /dev/null and b/2006/toledo2/WS33/WSMSGS.OVR differ diff --git a/2006/toledo2/WS33/WSOVLY1.OVR b/2006/toledo2/WS33/WSOVLY1.OVR new file mode 100644 index 000000000..962fb5390 Binary files /dev/null and b/2006/toledo2/WS33/WSOVLY1.OVR differ diff --git a/2006/toledo2/XDIR.COM b/2006/toledo2/XDIR.COM new file mode 100644 index 000000000..3fac999d0 Binary files /dev/null and b/2006/toledo2/XDIR.COM differ diff --git a/2006/toledo2/XSUB.COM b/2006/toledo2/XSUB.COM new file mode 100644 index 000000000..15e86abfc Binary files /dev/null and b/2006/toledo2/XSUB.COM differ diff --git a/bugs.md b/bugs.md index 3028f797b..1f3c53d8d 100644 --- a/bugs.md +++ b/bugs.md @@ -1559,7 +1559,7 @@ By design this program is supposed to crash on termination. You must type in caps (except in strings) and this program is indeed case-sensitive. -## STATUS: known bug - please help us fix +## STATUS: possible bug (possibly depending on system) - please help test and if necessary fix The author showed something like this in their remarks: @@ -1569,7 +1569,12 @@ A> IMPORT DDT.COM ``` but the `A>` prompt never appears; instead it's just the same as if you -specified no arg. +specified no arg which is `>`. It seems like the `A>` might be a typo. That +being said from the description by the author, if the required files exist in +the directory, it seems you can do `HALT` 'so the file is saved, and you can +start the same process with another file'. This does not seem to work but it +might be not enough information or a misunderstanding. + # 2007 @@ -1610,11 +1615,10 @@ tends to result in empty output. This does not appear to work with macOS, resulting in a segfault (and sometimes a bus error). -We're not -sure if this is to do with the Apple silicon chip or not but it seems like it -_might_ (see Apple resources below) be but it could also be a wider problem with macOS. It appears that -Apple does not allow certain combinations of memory protections with the arm64 -processor. +We're not sure if this is to do with the Apple silicon chip or not but it seems +like it _might_ (see Apple resources below) be but it could also be a wider +problem with macOS. It appears that Apple does not allow certain combinations of +memory protections with the arm64 processor. [Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) tried some of the workarounds but at this time he could not get it to work. He offers some earlier diff --git a/thanks-for-fixes.md b/thanks-for-fixes.md index 94ba0b19f..a410d5b20 100644 --- a/thanks-for-fixes.md +++ b/thanks-for-fixes.md @@ -1310,7 +1310,6 @@ lets it work in both linux and macOS. The problem was that it relied on 32-bits so some `int`s were changed to `long`s. The display problem might or might not have been a problem in linux with the old `int`s but this is no longer known. - ## [2011/goren](2011/goren/goren.c) ([README.md](2011/goren/README.md])) Cody fixed this for macOS. Before the fix it segfaulted. It worked fine under