|
|
@ -527,7 +527,7 @@ nextbaud: |
|
|
pop de ; get our count value |
|
|
pop de ; get our count value |
|
|
ld a,32 |
|
|
ld a,32 |
|
|
sub e |
|
|
sub e |
|
|
jr s_exit |
|
|
|
|
|
|
|
|
jr setspd |
|
|
; |
|
|
; |
|
|
mm1: inc hl |
|
|
mm1: inc hl |
|
|
mm2: inc hl |
|
|
mm2: inc hl |
|
|
@ -542,17 +542,6 @@ mm4: ex (sp),hl ; hl = count value, stack = tbl_baud, de = msw |
|
|
pop de |
|
|
pop de |
|
|
jp err_invcmd |
|
|
jp err_invcmd |
|
|
; |
|
|
; |
|
|
s_exit: cp 32 ; handle invalid |
|
|
|
|
|
jp nc,err_invcmd ; baud rate |
|
|
|
|
|
bit 0,a |
|
|
|
|
|
jr z,iseven ; convert sequential |
|
|
|
|
|
inc a ; baud rate code to |
|
|
|
|
|
srl a ; encoded baud rate |
|
|
|
|
|
jr setspd ; 13=9600 |
|
|
|
|
|
iseven: dec a ; 15=19200 |
|
|
|
|
|
srl a ; 17=38400 |
|
|
|
|
|
add a,16 ; 20=115200 |
|
|
|
|
|
; |
|
|
|
|
|
setspd: ld (newspeed),a ; save validated baud rate |
|
|
setspd: ld (newspeed),a ; save validated baud rate |
|
|
; |
|
|
; |
|
|
ld hl,str_chspeed ; notify user |
|
|
ld hl,str_chspeed ; notify user |
|
|
@ -651,37 +640,36 @@ tmpbcd: .db 0 |
|
|
tbl_baud: |
|
|
tbl_baud: |
|
|
PACK('0','0','0','0','0','7','5') ; 75 0 > 0 |
|
|
PACK('0','0','0','0','0','7','5') ; 75 0 > 0 |
|
|
PACK('0','0','0','0','1','5','0') ; 150 1 > 1 |
|
|
PACK('0','0','0','0','1','5','0') ; 150 1 > 1 |
|
|
PACK('0','0','0','0','2','2','5') ; 225 2 > 16 |
|
|
|
|
|
PACK('0','0','0','0','3','0','0') ; 300 3 > 2 |
|
|
PACK('0','0','0','0','3','0','0') ; 300 3 > 2 |
|
|
PACK('0','0','0','0','4','5','0') ; 450 4 > 17 |
|
|
|
|
|
PACK('0','0','0','0','6','0','0') ; 600 5 > 3 |
|
|
PACK('0','0','0','0','6','0','0') ; 600 5 > 3 |
|
|
PACK('0','0','0','0','9','0','0') ; 900 6 > 18 |
|
|
|
|
|
PACK('0','0','0','1','2','0','0') ; 1200 7 > 4 |
|
|
PACK('0','0','0','1','2','0','0') ; 1200 7 > 4 |
|
|
PACK('0','0','0','1','8','0','0') ; 1800 8 > 19 |
|
|
|
|
|
PACK('0','0','0','2','4','0','0') ; 2400 9 > 5 |
|
|
PACK('0','0','0','2','4','0','0') ; 2400 9 > 5 |
|
|
PACK('0','0','0','3','6','0','0') ; 3600 10 > 20 |
|
|
|
|
|
PACK('0','0','0','4','8','0','0') ; 4800 11 > 6 |
|
|
PACK('0','0','0','4','8','0','0') ; 4800 11 > 6 |
|
|
PACK('0','0','0','7','2','0','0') ; 7200 12 > 21 |
|
|
|
|
|
PACK('0','0','0','9','6','0','0') ; 9600 13 > 7 |
|
|
PACK('0','0','0','9','6','0','0') ; 9600 13 > 7 |
|
|
PACK('0','0','1','4','4','0','0') ; 14400 14 > 22 |
|
|
|
|
|
PACK('0','0','1','9','2','0','0') ; 19200 15 > 8 |
|
|
PACK('0','0','1','9','2','0','0') ; 19200 15 > 8 |
|
|
PACK('0','0','2','8','8','0','0') ; 28800 16 > 23 |
|
|
|
|
|
PACK('0','0','3','8','4','0','0') ; 38400 17 > 9 |
|
|
PACK('0','0','3','8','4','0','0') ; 38400 17 > 9 |
|
|
PACK('0','0','5','7','6','0','0') ; 57600 18 > 24 |
|
|
|
|
|
PACK('0','0','7','6','8','0','0') ; 76800 19 > 10 |
|
|
PACK('0','0','7','6','8','0','0') ; 76800 19 > 10 |
|
|
PACK('0','1','1','5','2','0','0') ; 115200 20 > 25 |
|
|
|
|
|
PACK('0','1','5','3','6','0','0') ; 153600 21 > 11 |
|
|
PACK('0','1','5','3','6','0','0') ; 153600 21 > 11 |
|
|
PACK('0','2','3','0','4','0','0') ; 230400 22 > 26 |
|
|
|
|
|
PACK('0','3','0','7','2','0','0') ; 307200 23 > 12 |
|
|
PACK('0','3','0','7','2','0','0') ; 307200 23 > 12 |
|
|
PACK('0','4','6','0','8','0','0') ; 460800 24 > 27 |
|
|
|
|
|
PACK('0','6','1','4','4','0','0') ; 614400 25 > 13 |
|
|
PACK('0','6','1','4','4','0','0') ; 614400 25 > 13 |
|
|
PACK('0','9','2','1','6','0','0') ; 921600 26 > 28 |
|
|
|
|
|
PACK('1','2','2','8','8','0','0') ; 1228800 27 > 14 |
|
|
PACK('1','2','2','8','8','0','0') ; 1228800 27 > 14 |
|
|
PACK('1','8','4','3','2','0','0') ; 1843200 28 > 29 |
|
|
|
|
|
PACK('2','4','5','7','6','0','0') ; 2457600 29 > 15 |
|
|
PACK('2','4','5','7','6','0','0') ; 2457600 29 > 15 |
|
|
|
|
|
PACK('0','0','0','0','2','2','5') ; 225 2 > 16 |
|
|
|
|
|
PACK('0','0','0','0','4','5','0') ; 450 4 > 17 |
|
|
|
|
|
PACK('0','0','0','0','9','0','0') ; 900 6 > 18 |
|
|
|
|
|
PACK('0','0','0','1','8','0','0') ; 1800 8 > 19 |
|
|
|
|
|
PACK('0','0','0','3','6','0','0') ; 3600 10 > 20 |
|
|
|
|
|
PACK('0','0','0','7','2','0','0') ; 7200 12 > 21 |
|
|
|
|
|
PACK('0','0','1','4','4','0','0') ; 14400 14 > 22 |
|
|
|
|
|
PACK('0','0','2','8','8','0','0') ; 28800 16 > 23 |
|
|
|
|
|
PACK('0','0','5','7','6','0','0') ; 57600 18 > 24 |
|
|
|
|
|
PACK('0','1','1','5','2','0','0') ; 115200 20 > 25 |
|
|
|
|
|
PACK('0','2','3','0','4','0','0') ; 230400 22 > 26 |
|
|
|
|
|
PACK('0','4','6','0','8','0','0') ; 460800 24 > 27 |
|
|
|
|
|
PACK('0','9','2','1','6','0','0') ; 921600 26 > 28 |
|
|
|
|
|
PACK('1','8','4','3','2','0','0') ; 1843200 28 > 29 |
|
|
PACK('3','6','8','6','4','0','0') ; 3686400 30 > 30 |
|
|
PACK('3','6','8','6','4','0','0') ; 3686400 30 > 30 |
|
|
PACK('7','3','7','2','8','0','0') ; 7372800 31 > 31 |
|
|
PACK('7','3','7','2','8','0','0') ; 7372800 31 > 31 |
|
|
; |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
; |
|
|
; |
|
|
; Set RomWBW HBIOS Diagnostic Level |
|
|
; Set RomWBW HBIOS Diagnostic Level |
|
|
@ -1407,7 +1395,7 @@ getnum2: ; return result |
|
|
or a ; with flags set, CF is cleared |
|
|
or a ; with flags set, CF is cleared |
|
|
ret |
|
|
ret |
|
|
; |
|
|
; |
|
|
; Is character in A numberic? NZ if not |
|
|
|
|
|
|
|
|
; Is character in A numeric? NZ if not |
|
|
; |
|
|
; |
|
|
isnum: |
|
|
isnum: |
|
|
cp '0' ; compare to ascii '0' |
|
|
cp '0' ; compare to ascii '0' |
|
|
@ -1420,7 +1408,7 @@ isnum1: |
|
|
or $FF ; set NZ |
|
|
or $FF ; set NZ |
|
|
ret ; and done |
|
|
ret ; and done |
|
|
; |
|
|
; |
|
|
; Delay 16us (cpu speed compensated) incuding call/ret invocation |
|
|
|
|
|
|
|
|
; Delay 16us (cpu speed compensated) including call/ret invocation |
|
|
; Register A and flags destroyed |
|
|
; Register A and flags destroyed |
|
|
; No compensation for z180 memory wait states |
|
|
; No compensation for z180 memory wait states |
|
|
; There is an overhead of 3ts per invocation |
|
|
; There is an overhead of 3ts per invocation |
|
|
|