Browse Source

Merge pull request #234 from b1ackmai1er/dev

zmp support command line port setting
patch
Wayne Warthen 4 years ago
committed by GitHub
parent
commit
a13ec71c7a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      Source/Apps/ZMP/Notes.txt
  2. 76
      Source/Apps/ZMP/zmo-rw01.z80
  3. 2
      Source/Apps/ZMP/zmp15+-.new

16
Source/Apps/ZMP/Notes.txt

@ -1,3 +1,6 @@
This ROMWBW version is an extract of https://github.com/mecparts/zmp/bin
as at Aug 23rd, 2021.
- Overlay files must reside on default drive at time program is - Overlay files must reside on default drive at time program is
launched. This seems to preclude the path search feature of launched. This seems to preclude the path search feature of
ZSDOS/ZCPR which would be nice. Need to look into this. ZSDOS/ZCPR which would be nice. Need to look into this.
@ -13,4 +16,15 @@
- System hangs after error message if there is no CIO 1 unit (fixed) - System hangs after error message if there is no CIO 1 unit (fixed)
- Initialization messages refer to CIO 1 as CIO 0 (fixed) - Initialization messages refer to CIO 1 as CIO 0 (fixed)
--WBW 1:58 PM 8/23/2021
--WBW 1:58 PM 8/23/2021
- Restore cursor on normal program exit.
- Revert original HBIOS conout and default console code as there
is no associated facility for direct HBIOS conin.
- Allow setting port 0 and port 1 CIO device from command line
ZMP 2 sets comms port to CIO 2. Can set primary and secondary
i.e. ZMP 21 but only primary supported on this ZMP version.
Untested on Ron Murrays ZMP15
- Space getting short so messages shortened.
--PMS 8/24/2021

76
Source/Apps/ZMP/zmo-rw01.z80

@ -98,10 +98,6 @@ debug equ false ; to allow debugging of overlay with Z8E etc.
overdrive equ 0 ; Drive to find overlay files on ('A'-'P') overdrive equ 0 ; Drive to find overlay files on ('A'-'P')
overuser equ 0 ; User area to find files overuser equ 0 ; User area to find files
; ;
; Initial ROMWBW CIO device
;
initdev equ 1 ; Second CIO device on system
;
; Initial baud rate code ; Initial baud rate code
; ;
initbr equ 10 ; Refer to "baudtbl" table below - brate column initbr equ 10 ; Refer to "baudtbl" table below - brate column
@ -132,7 +128,7 @@ ctrlq equ 11h
cr equ 0dh cr equ 0dh
lf equ 0ah lf equ 0ah
bdos equ 5 bdos equ 5
fcb equ 05ch+1 ; Command line
codebgn equ $ codebgn equ $
@ -174,7 +170,12 @@ jump_tab:
jp spare ; spare for later use jp spare ; spare for later use
jp spare ; spare for later use jp spare ; spare for later use
jp spare ; spare for later use jp spare ; spare for later use
;
; Port 0 & 1 defaults. Can be overwritten by command line
;
hbport0 db 1 ; default hbios CIO serial port 0
hbport1 db 2 ; alternate hbios CIO serial port 1
port: db 1 ; current cio port.
; ;
; Main code starts here ; Main code starts here
; ;
@ -197,9 +198,23 @@ spare:
; millisv (msv) ; millisv (msv)
userin: userin:
ld a,-1 ; force re-init
ld (mspeed),a
ld a,-1 ; force re-init ; forcing reinit will resend AT command to modem, reset
ld (mspeed),a ; current line defaults and eat up buffered characters
ld a,(fcb) ; first character
cp ' ' ; of parsed filename
jr z,defport0 ; is port 0
sub '0'
ld (hbport0),a ; set CIO for port 0
ld (port),a ; reconfigure default
defport0:
ld a,(fcb+1) ; second character
cp ' ' ; of parsed filename
jr z,defport1 ; is port 1
sub '0'
ld (hbport1),a
defport1:
;
push bc push bc
ld bc,0f8f0h ; get clock speed in l ld bc,0f8f0h ; get clock speed in l
rst 08 rst 08
@ -279,7 +294,7 @@ _loop1:
; User-defined exit routine: leave empty if not needed ; User-defined exit routine: leave empty if not needed
userout: userout:
call show
ret ret
@ -417,7 +432,7 @@ init:
; <== Insert your own code here ; <== Insert your own code here
; using values below ; using values below
call print call print
db cr,lf,cr,lf,'Initializing CIO device ...',cr,lf,0
db cr,lf,cr,lf,'CIO Init ...',cr,lf,0
ld a,(port) ; get device type ld a,(port) ; get device type
ld c,a ld c,a
@ -455,9 +470,8 @@ init:
jr nz,initerr jr nz,initerr
call print call print
db 'CIO device initialized: ',0
db 'Device: ',0
ld a,(port) ld a,(port)
;add a,'0'-1
add a,'0' add a,'0'
call cout call cout
call print call print
@ -471,9 +485,8 @@ init:
ret ret
initerr: initerr:
call print call print
db 'Unable to initialize CIO device: ',0
db 'Init failed, CIO device: ',0
ld a,(port) ld a,(port)
;add a,'0'-1
add a,'0' add a,'0'
call cout call cout
call print call print
@ -520,6 +533,8 @@ baudtbl:
; this routine returning with no changes made. Note that ZMP calls this ; this routine returning with no changes made. Note that ZMP calls this
; routine with both values for the port on initialisation. ; routine with both values for the port on initialisation.
; ;
; Only originl ZMP calls setport. Mecports
;
setport: setport:
ld hl,2 ; get port number ld hl,2 ; get port number
add hl,sp add hl,sp
@ -528,23 +543,27 @@ setport:
; <== Insert your own code here ; <== Insert your own code here
inc l ; l = cio 1 or cio 2
ld a,l ; point to which port
ld hl,hbport0 ; we want to set
or a
jr z,isport0
inc hl
isport0:
ld c,(hl) ; get the associated CIO port
push hl push hl
ld b,06h ; test if a valid cio ld b,06h ; test if a valid cio
ld c,l
rst 08 rst 08
pop hl pop hl
or a or a
ld a,l
ld (port),a
ld a,(hl) ; get the associated CIO port
jr nz,seterr jr nz,seterr
ld (port),a ; save the valid port
push hl push hl
call print call print
db 'Setting CIO device: ',0 db 'Setting CIO device: ',0
pop hl pop hl
ld a,l
;add a,'0'-1
add a,'0' add a,'0'
call cout call cout
call print call print
@ -555,8 +574,7 @@ seterr:
call print call print
db 'Unable to set CIO device: ',0 db 'Unable to set CIO device: ',0
pop hl pop hl
ld a,l
;add a,'0'-1
ld a,(hl) ; get port we wanted to set
add a,'0' add a,'0'
call cout call cout
call print call print
@ -564,7 +582,7 @@ seterr:
; <== End of your own code ; <== End of your own code
ret ret
port: db initdev ; zmp port 0 = cio 1, zmp port 1 = cio 2
;**************************************************************************** ;****************************************************************************
;Video terminal sequences: these are for VT-100: Modify as you wish ;Video terminal sequences: these are for VT-100: Modify as you wish
@ -754,13 +772,9 @@ cout:
push bc ; save regs push bc ; save regs
push de push de
push hl push hl
; ld e,a ; character to E
; ld c,2
; call bdos ; print it
ld b,01h
ld c,80h
ld e,a
rst 08
ld e,a ; character to E
ld c,2
call bdos ; print it
pop hl pop hl
pop de pop de
pop bc pop bc

2
Source/Apps/ZMP/zmp15+-.new

@ -25,5 +25,3 @@ the format of this file."
June 7, 2021 June 7, 2021
This ROMWBW version is an extract of https://github.com/mecparts/zmp/bin
as at Aug 23rd, 2021.

Loading…
Cancel
Save