mirror of https://github.com/wwarthen/RomWBW.git
committed by
GitHub
40 changed files with 5896 additions and 86 deletions
@ -1,5 +1,5 @@ |
|||
OBJECTS = |
|||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz |
|||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest kbdinfo |
|||
DEST = ../../../Binary/Apps/Test |
|||
TOOLS =../../../Tools |
|||
|
|||
|
|||
@ -0,0 +1,10 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
set TOOLS=../../../../Tools |
|||
set PATH=%TOOLS%\tasm32;%PATH% |
|||
set TASMTABS=%TOOLS%\tasm32 |
|||
|
|||
tasm -t180 -g3 -fFF kbdinfo.asm kbdinfo.com kbdinfo.lst || exit /b |
|||
|
|||
copy /Y kbdinfo.com ..\..\..\..\Binary\Apps\Test\ || exit /b |
|||
@ -0,0 +1,6 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.com del *.com |
|||
if exist *.lst del *.lst |
|||
if exist *.bin del *.bin |
|||
@ -0,0 +1,7 @@ |
|||
OBJECTS = kbdinfo.com |
|||
DEST = ../../../../Binary/Apps/Test |
|||
TOOLS =../../../../Tools |
|||
|
|||
USETASM=1 |
|||
|
|||
include $(TOOLS)/Makefile.inc |
|||
@ -0,0 +1,869 @@ |
|||
; |
|||
;======================================================================= |
|||
; Keyboard Information Utility (KBDINFO) |
|||
;======================================================================= |
|||
; |
|||
; Simple utility that attempts to determine the type of keyboard you |
|||
; have attached to an 8242 keyboard controller. |
|||
; |
|||
;======================================================================= |
|||
; |
|||
; Keyboard controller port addresses (adjust as needed) |
|||
; |
|||
iocmd .equ $E3 ; keyboard controller command port address |
|||
iodat .equ $E2 ; keyboard controller data port address |
|||
; |
|||
cpumhz .equ 8 ; for time delay calculations (not critical) |
|||
; |
|||
; General operational equates (should not requre adjustment) |
|||
; |
|||
stksiz .equ $40 ; Working stack size |
|||
; |
|||
ltimout .equ 0 ; 256*10ms = 2.56s |
|||
stimout .equ 10 ; 10*10ms = 100ms |
|||
; |
|||
restart .equ $0000 ; CP/M restart vector |
|||
bdos .equ $0005 ; BDOS invocation vector |
|||
; |
|||
;======================================================================= |
|||
; |
|||
.org $100 ; standard CP/M executable |
|||
; |
|||
; |
|||
; setup stack (save old value) |
|||
ld (stksav),sp ; save stack |
|||
ld sp,stack ; set new stack |
|||
; |
|||
call crlf |
|||
ld de,str_banner ; banner |
|||
call prtstr |
|||
; |
|||
call main ; do the real work |
|||
jr z,exit ; completed all tests |
|||
ld de,str_run_failed |
|||
call crlf2 |
|||
call prtstr |
|||
; |
|||
exit: |
|||
call crlf2 |
|||
ld de,str_exit |
|||
call prtstr |
|||
|
|||
; clean up and return to command processor |
|||
call crlf ; formatting |
|||
ld sp,(stksav) ; restore stack |
|||
jp restart ; return to CP/M via restart |
|||
; |
|||
; |
|||
;======================================================================= |
|||
; Main Program |
|||
;======================================================================= |
|||
; |
|||
main: |
|||
; |
|||
; Display active keyboard controller port addresses |
|||
; |
|||
call crlf2 |
|||
ld de,str_cmdport |
|||
call prtstr |
|||
ld a,iocmd |
|||
call prthex |
|||
call crlf |
|||
ld de,str_dataport |
|||
call prtstr |
|||
ld a,iodat |
|||
call prthex |
|||
; |
|||
; First, we attempt to contact the controller and keyboard, then |
|||
; print the keyboard identity and scan codes scupported |
|||
; |
|||
; Run test series with translation off |
|||
call crlf2 |
|||
ld de,str_basic |
|||
call prtstr |
|||
; |
|||
call do_basic |
|||
ret nz |
|||
; |
|||
; We make two passes through the test series with different controller |
|||
; setup values. The first time is with scan code translation off and |
|||
; the second time with it on. |
|||
; |
|||
; Run test series with translation off |
|||
call crlf2 |
|||
ld de,str_trans_off |
|||
call prtstr |
|||
; |
|||
ld a,$20 ; xlat disabled, mouse disabled, no ints |
|||
ld (ctlr_cfgval),a |
|||
call do_tests |
|||
; |
|||
; Run test series with translation on |
|||
call crlf2 |
|||
ld de,str_trans_on |
|||
call prtstr |
|||
; |
|||
ld a,$60 ; xlat enabled, mouse disabled, no ints |
|||
ld (ctlr_cfgval),a |
|||
call do_tests |
|||
|
|||
xor a ; signal success |
|||
ret |
|||
; |
|||
; Perform basic keyboard tests, display keyboard identity, and |
|||
; inventory the supported scan code sets. |
|||
; |
|||
do_basic: |
|||
call ctlr_test |
|||
ret nz |
|||
; |
|||
ld a,$20 ; Xlat off for this checking |
|||
call ctlr_setup |
|||
ret nz |
|||
; |
|||
call kbd_reset |
|||
ret nz |
|||
; |
|||
call kbd_ident |
|||
;ret nz |
|||
; |
|||
ld b,3 ; Loop control, 3 scan code sets |
|||
ld c,1 ; Current scan code number |
|||
do_basic1: |
|||
ld a,c ; Scan code set to A |
|||
push bc |
|||
call kbd_setsc ; Attempt to set it |
|||
pop bc |
|||
push af ; save result |
|||
call crlf2 |
|||
ld de,str_sc_tag |
|||
call prtstr |
|||
ld a,c |
|||
call prtdecb |
|||
pop af ; restore result |
|||
ld de,str_sc_ok |
|||
jr z,do_basic2 |
|||
ld de,str_sc_fail |
|||
do_basic2: |
|||
call prtstr |
|||
inc c |
|||
djnz do_basic1 |
|||
; |
|||
xor a ; signal success |
|||
ret |
|||
; |
|||
; This routine runs a series of controller and keyboard tests. The |
|||
; desired controller setup value should be placed in ctlr_cfgval |
|||
; prior to invoking this routine. |
|||
; |
|||
do_tests: |
|||
call ctlr_test |
|||
ret nz |
|||
; |
|||
ld a,(ctlr_cfgval) |
|||
call ctlr_setup |
|||
ret nz |
|||
; |
|||
call kbd_reset |
|||
ret nz |
|||
; |
|||
call kbd_ident |
|||
;ret nz |
|||
; |
|||
ld a,2 |
|||
call kbd_setsc |
|||
;ret nz |
|||
; |
|||
call kbd_dispsc |
|||
;ret nz |
|||
; |
|||
call kbd_showkeys |
|||
;ret nz |
|||
; |
|||
xor a ; signal success |
|||
ret |
|||
; |
|||
;======================================================================= |
|||
; Keyboard/Controller Test Routines |
|||
;======================================================================= |
|||
; |
|||
; Attempt self-test command on keyboard controller |
|||
; |
|||
; Keyboard controller should respond with an 0x55 on data port |
|||
; after being sent a 0xAA on the command port. |
|||
; |
|||
ctlr_test: |
|||
call crlf2 |
|||
ld de,str_ctlr_test |
|||
call prtstr |
|||
ld a,$aa ; self-test command |
|||
call put_cmd_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $55 ; expected value? |
|||
jp nz,err_ctlr_test ; handle self-test error |
|||
call crlf |
|||
ld de,str_ctlr_test_ok |
|||
call prtstr |
|||
xor a |
|||
ret |
|||
; |
|||
; Keyboard controller setup |
|||
; |
|||
; Set keyboard controller command register to value in A |
|||
; |
|||
ctlr_setup: |
|||
push af ; save incoming value |
|||
call crlf2 |
|||
ld de,str_ctlr_setup |
|||
call prtstr |
|||
ld a,$60 ; write to command register 0 |
|||
call put_cmd_dbg |
|||
pop bc ; recover incoming to B |
|||
jp c,err_ctlr_to ; handle controller error |
|||
ld a,b |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
xor a |
|||
ret |
|||
; |
|||
; Perform a keyboard reset |
|||
; |
|||
kbd_reset: |
|||
call crlf2 |
|||
ld de,str_kbd_reset |
|||
call prtstr |
|||
ld a,$ff ; Keyboard reset |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_reset |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $AA ; Success? |
|||
jp nz,err_kbd_reset |
|||
call crlf |
|||
ld de,str_kbd_reset_ok |
|||
call prtstr |
|||
xor a |
|||
ret |
|||
; |
|||
; Identify keyboard |
|||
; |
|||
kbd_ident: |
|||
call crlf2 |
|||
ld de,str_kbd_ident |
|||
call prtstr |
|||
ld a,$f2 ; Identify keyboard command |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_ident |
|||
; Now we need to receive 0-2 bytes. There is no way to know |
|||
; how many are coming, so we receive bytes until there is a |
|||
; timeout error. Timeout is shortened here so that we don't |
|||
; have to wait seconds for the routine to complete normally. |
|||
; A short timeout is more than sufficient here. |
|||
ld ix,workbuf |
|||
ld a,(timeout) ; save current timeout |
|||
push af |
|||
ld a,stimout ; set a short timeout |
|||
ld (timeout),a |
|||
ld b,8 ; buf max |
|||
ld c,0 ; buf len |
|||
kbd_ident1: |
|||
push bc |
|||
call get_data_dbg |
|||
pop bc |
|||
jr c,kbd_ident2 |
|||
ld (ix),a |
|||
inc ix |
|||
inc c |
|||
djnz kbd_ident1 |
|||
kbd_ident2: |
|||
pop af ; restore original timeout |
|||
ld (timeout),a |
|||
call crlf |
|||
ld de,str_kbd_ident_disp |
|||
call prtstr |
|||
ld a,'[' |
|||
call prtchr |
|||
ld ix,workbuf |
|||
ld a,c ; bytes to print |
|||
or a ; check for zero |
|||
jr z,kbd_ident4 ; handle zero |
|||
ld b,a ; setup loop counter |
|||
jr kbd_ident3a |
|||
kbd_ident3: |
|||
ld a,',' |
|||
call prtchr |
|||
kbd_ident3a: |
|||
ld a,(ix) |
|||
call prthex |
|||
inc ix |
|||
djnz kbd_ident3 |
|||
kbd_ident4: |
|||
ld a,']' |
|||
call prtchr |
|||
xor a |
|||
ret |
|||
; |
|||
; Display active scan code set being used |
|||
; |
|||
kbd_dispsc: |
|||
call crlf2 |
|||
ld de,str_kbd_getsc |
|||
call prtstr |
|||
ld a,$f0 ; Keyboard get/set scan code |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_getsc |
|||
ld a,$00 ; Get active scan code set |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_getsc |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
push af |
|||
call crlf |
|||
ld de,str_kbd_dispsc |
|||
call prtstr |
|||
pop af |
|||
call prtdecb |
|||
xor a |
|||
ret |
|||
; |
|||
; Set active scan code set to value in A |
|||
; |
|||
kbd_setsc: |
|||
ld (kbd_setsc_val),a ; Save incoming value |
|||
call crlf2 |
|||
ld de,str_kbd_setsc |
|||
call prtstr |
|||
call prtdecb |
|||
ld a,$f0 ; Keyboard get/set scan code |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_setsc |
|||
ld a,(kbd_setsc_val) ; Recover scan code set value |
|||
call put_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
call get_data_dbg |
|||
jp c,err_ctlr_to ; handle controller error |
|||
cp $FA ; Is it an ack as expected? |
|||
jp nz,err_kbd_setsc |
|||
xor a |
|||
ret |
|||
; |
|||
kbd_setsc_val .db 0 |
|||
; |
|||
; |
|||
; Read and display raw scan codes |
|||
; |
|||
kbd_showkeys: |
|||
call crlf2 |
|||
ld de,str_disp_scan_codes |
|||
call prtstr |
|||
read_loop: |
|||
ld c,$06 ; BDOS direct console I/O |
|||
ld e,$FF ; Subfunction = read |
|||
call bdos |
|||
cp $1B ; Escape key? |
|||
ret z |
|||
call check_read |
|||
jr nz,read_loop |
|||
call get_data |
|||
jp c,err_ctlr_to ; handle controller error |
|||
push af |
|||
ld a,' ' |
|||
call prtchr |
|||
ld a,'[' |
|||
call prtchr |
|||
pop af |
|||
call prthex |
|||
ld a,']' |
|||
call prtchr |
|||
jr read_loop |
|||
; |
|||
;======================================================================= |
|||
; Keyboard Controller I/O Routines |
|||
;======================================================================= |
|||
; |
|||
wait_write: |
|||
; |
|||
; Wait for keyboard controller to be ready for a write |
|||
; A=0 indicates success (ZF set) |
|||
; |
|||
ld a,(timeout) ; setup timeout constant |
|||
ld b,a |
|||
wait_write1: |
|||
in a,(iocmd) ; get status |
|||
ld c,a ; save status |
|||
and $02 ; isolate input buf status bit |
|||
ret z ; 0 means ready, all done |
|||
call delay ; wait a bit |
|||
djnz wait_write1 ; loop until counter exhausted |
|||
; ld de,str_timeout_write ; write timeout message |
|||
; call crlf |
|||
; call prtstr |
|||
; ld a,c ; recover last status value |
|||
; call prthex |
|||
or $ff ; signal error |
|||
ret |
|||
; |
|||
wait_read: |
|||
; |
|||
; Wait for keyboard controller to be ready to read a byte |
|||
; A=0 indicates success (ZF set) |
|||
; |
|||
ld a,(timeout) ; setup timeout constant |
|||
ld b,a |
|||
wait_read1: |
|||
in a,(iocmd) ; get status |
|||
ld c,a ; save status |
|||
and $01 ; isolate input buf status bit |
|||
xor $01 ; invert so 0 means ready |
|||
ret z ; if 0, all done |
|||
call delay ; wait a bit |
|||
djnz wait_read1 ; loop until counter exhausted |
|||
; ld de,str_timeout_read ; write timeout message |
|||
; call crlf |
|||
; call prtstr |
|||
; ld a,c ; recover last status value |
|||
; call prthex |
|||
or $ff ; signal error |
|||
ret |
|||
; |
|||
check_read: |
|||
; |
|||
; Check for data ready to read |
|||
; A=0 indicates data available (ZF set) |
|||
; |
|||
in a,(iocmd) ; get status |
|||
and $01 ; isolate input buf status bit |
|||
xor $01 ; invert so 0 means ready |
|||
ret |
|||
; |
|||
put_cmd: |
|||
; |
|||
; Put a cmd byte from A to the keyboard interface with timeout |
|||
; CF set indicates timeout error |
|||
; |
|||
ld e,a ; save incoming value |
|||
call wait_write ; wait for controller ready |
|||
jr z,put_cmd1 ; if ready, move on |
|||
scf ; else, signal timeout error |
|||
ret ; and bail out |
|||
put_cmd1: |
|||
ld a,e ; recover value to write |
|||
out (iocmd),a ; write it |
|||
or a ; clear CF for success |
|||
ret |
|||
; |
|||
put_cmd_dbg: |
|||
call put_cmd |
|||
ret c |
|||
push af |
|||
|
|||
call crlf |
|||
ld de,str_put_cmd |
|||
call prtstr |
|||
call prthex |
|||
|
|||
; ld de,str_prefix ; " " |
|||
; call prtstr |
|||
; call prthex |
|||
; ld de,str_cmdout ; "->(CMD)" |
|||
; call prtstr |
|||
|
|||
pop af |
|||
ret |
|||
; |
|||
put_data: |
|||
; |
|||
; Put a data byte from A to the keyboard interface with timeout |
|||
; CF set indicates timeout error |
|||
; |
|||
ld e,a ; save incoming value |
|||
call wait_write ; wait for controller ready |
|||
jr z,put_data1 ; if ready, move on |
|||
scf ; else, signal timeout error |
|||
ret ; and bail out |
|||
put_data1: |
|||
ld a,e ; recover value to write |
|||
out (iodat),a ; write it |
|||
or a ; clear CF for success |
|||
ret |
|||
; |
|||
put_data_dbg: |
|||
call put_data |
|||
ret c |
|||
push af |
|||
|
|||
call crlf |
|||
ld de,str_put_data |
|||
call prtstr |
|||
call prthex |
|||
|
|||
; ld de,str_prefix ; " " |
|||
; call prtstr |
|||
; call prthex |
|||
; ld de,str_dataout ; "->(DATA)" |
|||
; call prtstr |
|||
|
|||
pop af |
|||
ret |
|||
|
|||
; |
|||
; Get a data byte from the keyboard interface to A with timeout |
|||
; CF set indicates timeout error |
|||
; |
|||
get_data: |
|||
call wait_read ; wait for byte to be ready |
|||
jr z,get_data1 ; if readym, move on |
|||
scf ; else signal timeout error |
|||
ret ; and bail out |
|||
get_data1: |
|||
in a,(iodat) ; get data byte |
|||
or a ; clear CF for success |
|||
ret |
|||
; |
|||
get_data_dbg: |
|||
call get_data |
|||
ret c |
|||
push af |
|||
|
|||
call crlf |
|||
ld de,str_get_data |
|||
call prtstr |
|||
call prthex |
|||
|
|||
; ld de,str_datain ; " (DATA)->" |
|||
; call prtstr |
|||
; call prthex |
|||
|
|||
pop af |
|||
ret |
|||
; |
|||
; Error Handlers |
|||
; |
|||
err_ctlr_to: |
|||
ld de,str_err_ctlr_to |
|||
jr err_ret |
|||
; |
|||
err_ctlr_test: |
|||
ld de,str_err_ctlr_test |
|||
jr err_ret |
|||
; |
|||
err_kbd_reset: |
|||
ld de,str_err_kbd_reset |
|||
jr err_ret |
|||
; |
|||
err_kbd_getsc: |
|||
ld de,str_err_kbd_getsc |
|||
jr err_ret |
|||
; |
|||
err_kbd_setsc: |
|||
ld de,str_err_kbd_setsc |
|||
jr err_ret |
|||
; |
|||
err_kbd_ident: |
|||
ld de,str_err_kbd_ident |
|||
jr err_ret |
|||
; |
|||
err_ret: |
|||
call crlf2 |
|||
call prtstr |
|||
or $ff ; signal error |
|||
ret |
|||
; |
|||
;======================================================================= |
|||
; Utility Routines |
|||
;======================================================================= |
|||
; |
|||
; |
|||
; Print character in A without destroying any registers |
|||
; |
|||
prtchr: |
|||
push bc ; save registers |
|||
push de |
|||
push hl |
|||
ld e,a ; character to print in E |
|||
ld c,$02 ; BDOS function to output a character |
|||
call bdos ; do it |
|||
pop hl ; restore registers |
|||
pop de |
|||
pop bc |
|||
ret |
|||
; |
|||
prtdot: |
|||
; |
|||
; shortcut to print a dot preserving all regs |
|||
push af ; save af |
|||
ld a,'.' ; load dot char |
|||
call prtchr ; print it |
|||
pop af ; restore af |
|||
ret ; done |
|||
; |
|||
; Print a zero terminated string at (de) without destroying any registers |
|||
; |
|||
prtstr: |
|||
push af |
|||
push de |
|||
; |
|||
prtstr1: |
|||
ld a,(de) ; get next char |
|||
or a |
|||
jr z,prtstr2 |
|||
call prtchr |
|||
inc de |
|||
jr prtstr1 |
|||
; |
|||
prtstr2: |
|||
pop de ; restore registers |
|||
pop af |
|||
ret |
|||
; |
|||
; Print a hex value prefix "0x" |
|||
; |
|||
prthexpre: |
|||
push af |
|||
ld a,'0' |
|||
call prtchr |
|||
ld a,'x' |
|||
call prtchr |
|||
pop af |
|||
ret |
|||
|
|||
; |
|||
; Print the value in A in hex without destroying any registers |
|||
; |
|||
prthex: |
|||
call prthexpre |
|||
prthex1: |
|||
push af ; save AF |
|||
push de ; save DE |
|||
call hexascii ; convert value in A to hex chars in DE |
|||
ld a,d ; get the high order hex char |
|||
call prtchr ; print it |
|||
ld a,e ; get the low order hex char |
|||
call prtchr ; print it |
|||
pop de ; restore DE |
|||
pop af ; restore AF |
|||
ret ; done |
|||
; |
|||
; print the hex word value in hl |
|||
; |
|||
prthexword: |
|||
call prthexpre |
|||
prthexword1: |
|||
push af |
|||
ld a,h |
|||
call prthex1 |
|||
ld a,l |
|||
call prthex1 |
|||
pop af |
|||
ret |
|||
; |
|||
; print the hex dword value in de:hl |
|||
; |
|||
prthex32: |
|||
call prthexpre |
|||
push bc |
|||
push de |
|||
pop bc |
|||
call prthexword1 |
|||
push hl |
|||
pop bc |
|||
call prthexword1 |
|||
pop bc |
|||
ret |
|||
; |
|||
; Convert binary value in A to ascii hex characters in DE |
|||
; |
|||
hexascii: |
|||
ld d,a ; save A in D |
|||
call hexconv ; convert low nibble of A to hex |
|||
ld e,a ; save it in E |
|||
ld a,d ; get original value back |
|||
rlca ; rotate high order nibble to low bits |
|||
rlca |
|||
rlca |
|||
rlca |
|||
call hexconv ; convert nibble |
|||
ld d,a ; save it in D |
|||
ret ; done |
|||
; |
|||
; Convert low nibble of A to ascii hex |
|||
; |
|||
hexconv: |
|||
and $0F ; low nibble only |
|||
add a,$90 |
|||
daa |
|||
adc a,$40 |
|||
daa |
|||
ret |
|||
; |
|||
; Print value of A or HL in decimal with leading zero suppression |
|||
; Use prtdecb for A or prtdecw for HL |
|||
; |
|||
prtdecb: |
|||
push hl |
|||
ld h,0 |
|||
ld l,a |
|||
call prtdecw ; print it |
|||
pop hl |
|||
ret |
|||
; |
|||
prtdecw: |
|||
push af |
|||
push bc |
|||
push de |
|||
push hl |
|||
call prtdec0 |
|||
pop hl |
|||
pop de |
|||
pop bc |
|||
pop af |
|||
ret |
|||
; |
|||
prtdec0: |
|||
ld e,'0' |
|||
ld bc,-10000 |
|||
call prtdec1 |
|||
ld bc,-1000 |
|||
call prtdec1 |
|||
ld bc,-100 |
|||
call prtdec1 |
|||
ld c,-10 |
|||
call prtdec1 |
|||
ld e,0 |
|||
ld c,-1 |
|||
prtdec1: |
|||
ld a,'0' - 1 |
|||
prtdec2: |
|||
inc a |
|||
add hl,bc |
|||
jr c,prtdec2 |
|||
sbc hl,bc |
|||
cp e |
|||
ret z |
|||
ld e,0 |
|||
call prtchr |
|||
ret |
|||
; |
|||
; Start a new line |
|||
; |
|||
crlf2: |
|||
call crlf ; two of them |
|||
crlf: |
|||
push af ; preserve AF |
|||
ld a,13 ; <CR> |
|||
call prtchr ; print it |
|||
ld a,10 ; <LF> |
|||
call prtchr ; print it |
|||
pop af ; restore AF |
|||
ret |
|||
; |
|||
; Delay ~10ms |
|||
; |
|||
delay: |
|||
push af |
|||
push de |
|||
ld de,625 ; 10000us/16us |
|||
delay0: |
|||
ld a,(cpuscl) |
|||
delay1: |
|||
dec a |
|||
jr nz,delay1 |
|||
dec de |
|||
ld a,d |
|||
or e |
|||
jp nz,delay0 |
|||
pop de |
|||
pop af |
|||
ret |
|||
; |
|||
; |
|||
; |
|||
;======================================================================= |
|||
; Constants |
|||
;======================================================================= |
|||
; |
|||
str_banner .db "Keyboard Information v0.2, 23-Dec-2021",0 |
|||
str_exit .db "Done, Thank you for using Keyboard Information!",0 |
|||
str_cmdport .db "Keyboard Controller Command Port: ",0 |
|||
str_dataport .db "Keyboard Controller Data Port: ",0 |
|||
;str_prefix .db " ",0 |
|||
;str_cmdout .db "->(CMD)",0 |
|||
;str_dataout .db "->(DATA)",0 |
|||
;str_datain .db " (DATA)->",0 |
|||
;str_timeout_write .db "Keyboard Controller Write Timeout, Status: ",0 |
|||
;str_timeout_read .db "Keyboard Controller Read Timeout, Status: ",0 |
|||
str_err_ctlr_to .db "Keyboard Controller I/O Timeout",0 |
|||
str_err_ctlr_test .db "Keyboard Controller Self-Test Failed",0 |
|||
str_put_cmd .db " Sent Command ",0 |
|||
str_put_data .db " Sent Data ",0 |
|||
str_get_data .db " Got Data ",0 |
|||
str_ctlr_test .db "Attempting Controller Self-Test",0 |
|||
str_ctlr_test_ok .db "Controller Self-Test OK",0 |
|||
str_ctlr_setup .db "Performing Controller Setup",0 |
|||
str_basic .db "***** Basic Keyboard Checks and Scan Code Inventory *****",0 |
|||
str_trans_off .db "***** Testing with Scan Code Translation DISABLED *****",0 |
|||
str_trans_on .db "***** Testing with Scan Code Translation ENABLED *****",0 |
|||
str_kbd_reset .db "Attempting Keyboard Reset",0 |
|||
str_kbd_reset_ok .db "Keyboard Reset OK",0 |
|||
str_err_kbd_reset .db "Keyboard Reset Failed",0 |
|||
str_kbd_getsc .db "Requesting Active Scan Code Set from Keyboard",0 |
|||
str_kbd_dispsc .db "Active Keyboard Scan Code Set is #",0 |
|||
str_err_kbd_getsc .db "Error getting Active Keyboard Scan Code Set",0 |
|||
str_kbd_setsc .db "Setting Active Keyboard Scan Code Set to #",0 |
|||
str_err_kbd_setsc .db "Error setting Active Keyboard Scan Code Set",0 |
|||
str_kbd_ident .db "Keyboard Identification",0 |
|||
str_kbd_ident_disp .db "Keyboard Identity: ",0 |
|||
str_sc_tag .db "Scan Code Set #",0 |
|||
str_sc_ok .db " IS supported",0 |
|||
str_sc_fail .db " IS NOT supported",0 |
|||
str_err_kbd_ident .db "Error performing Keyboard Identification",0 |
|||
str_disp_scan_codes .db "Displaying Raw Scan Codes",13,10 |
|||
.db " Press keys on test keyboard to display scan codes",13,10 |
|||
.db " Press <esc> on CP/M console to end",13,10,13,10,0 |
|||
str_run_failed .db "***** HARDWARE ERROR *****",13,10,13,10 |
|||
.db "A basic hardware or configuration issue prevented",13,10 |
|||
.db "Keyboard Information from completing the full set",13,10 |
|||
.db "of tests. Check your hardware and verify the port",13,10 |
|||
.db "addresses being used for the keyboard controller",0 |
|||
; |
|||
;======================================================================= |
|||
; Working data |
|||
;======================================================================= |
|||
; |
|||
stksav .dw 0 ; stack pointer saved at start |
|||
.fill stksiz,0 ; stack |
|||
stack .equ $ ; stack top |
|||
; |
|||
workbuf .fill 8 |
|||
workbuf_len .db 0 |
|||
; |
|||
ctlr_cfgval .db 0 ; Value for controller cmd reg 0 |
|||
; |
|||
cpuscl .db cpumhz - 2 |
|||
timeout .db ltimout |
|||
; |
|||
;======================================================================= |
|||
; |
|||
.end |
|||
@ -0,0 +1,11 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
set TOOLS=../../../../Tools |
|||
set PATH=%TOOLS%\tasm32;%PATH% |
|||
set TASMTABS=%TOOLS%\tasm32 |
|||
|
|||
tasm -t180 -g3 -fFF kbdtest.asm kbdtest.com kbdtest.lst || exit /b |
|||
|
|||
copy /Y kbdtest.com ..\..\..\..\Binary\Apps\Test\ || exit /b |
|||
|
|||
@ -0,0 +1,6 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.com del *.com |
|||
if exist *.lst del *.lst |
|||
if exist *.bin del *.bin |
|||
@ -0,0 +1,7 @@ |
|||
OBJECTS = kbdtest.com |
|||
DEST = ../../../../Binary/Apps/Test |
|||
TOOLS =../../../../Tools |
|||
|
|||
USETASM=1 |
|||
|
|||
include $(TOOLS)/Makefile.inc |
|||
@ -0,0 +1,368 @@ |
|||
; |
|||
; Test program for Z80 KBDMSE on Retrobrewcomputer.org (Load with CPM). |
|||
; |
|||
; V0.1 ;Original version 2/23/2014 by John Monahan |
|||
; V0.2 ;Update for Z80 KBDMSE with VT82C42 PS/2 Keyboard Controller by Andrew Lynch |
|||
; |
|||
; Based on works by John Monahan S100Computers.com |
|||
; for S100 MSDOS Support Board with HT6542B Keyboard Controller |
|||
; Thanks to John for generously posting this program for others to use and adapt |
|||
; |
|||
; This is a simple test program to work with the Z80 KBDMSE board. It is written so |
|||
; the only other hardware use is the CP/M Console Port -- typically serial port interface. |
|||
; Note the data is displayed in crude (bulk) form. A proper scancode to ASCII translation |
|||
; routine must be written for practical use. See the IBM PC BIOS or SKEY.Z80 docs |
|||
|
|||
|
|||
|
|||
; PORT ASSIGNMENTS |
|||
|
|||
KEY_DATA .EQU 0E2H ;Port used to access keyboard & Mouse (also sometimes Controller itself) |
|||
KEY_CTRL .EQU 0E3H ;Port for VT82C42 PS/2 Keyboard & Mouse Controller |
|||
|
|||
ESC .EQU 1BH |
|||
CR .EQU 0DH |
|||
LF .EQU 0AH |
|||
TAB .EQU 09H |
|||
BELL .EQU 07H |
|||
|
|||
.ORG 0100H |
|||
START: |
|||
LD SP,STACK |
|||
|
|||
LD HL,SIGNON ; Signon |
|||
CALL PRINT_STRING |
|||
|
|||
LD C,0AAH ;Test PS/2 Controller |
|||
CALL CMD_OUT |
|||
CHK1: |
|||
CALL KEY_IN_STATUS ;wait for feedback |
|||
JR Z,CHK1 |
|||
IN A,(KEY_DATA) |
|||
CP 055H ;If not 55H then error |
|||
JR NZ,INIT_ERR |
|||
LD C,060H ; Set keyboard controller cmd byte |
|||
CALL CMD_OUT |
|||
LD C,$60 ; XLAT ENABLED, MOUSE DISABLED, NO INTS |
|||
CALL KEY_OUT |
|||
LD C,0AEH ;Enable 1st PS/2 port |
|||
CALL CMD_OUT ;Send it |
|||
JR DONE_INIT |
|||
|
|||
INIT_ERR: |
|||
LD HL,INIT_ERR_STR ;Say error |
|||
CALL PRINT_STRING |
|||
HALT ;Just Halt! |
|||
|
|||
DONE_INIT: |
|||
LD HL,INIT_OK ;Say all OK |
|||
CALL PRINT_STRING |
|||
|
|||
LOOP: |
|||
CALL KEY_IN_STATUS ;See if keyboard key available |
|||
JR Z,LOOP |
|||
IN A,(KEY_DATA) |
|||
LD C,A ;Store in [C] |
|||
LD HL,SCAN_MSG |
|||
CALL PRINT_STRING ;No registers changed |
|||
|
|||
CALL A_HEXOUT ;Display Hex value of typed character + two spaces |
|||
|
|||
;CP 0F0H ;Is it an UP key |
|||
AND 080H ;Is it an UP key |
|||
JR Z,DOWNKY ;Must be a down key stroke |
|||
LD HL,UPKEY_MSG ;Say Up Key |
|||
CALL PRINT_STRING |
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
DOWNKY: |
|||
CP 58H ;Is it CAPS Lock key |
|||
; CP 3AH ;Is it CAPS Lock key |
|||
JR NZ,NOT_CAPSKEY |
|||
LD HL,CAPS_MSG ;Say Caps lock key |
|||
CALL PRINT_STRING |
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
NOT_CAPSKEY: |
|||
CP 12H ;Is it a SHIFT key |
|||
; CP 2AH ;Is it a SHIFT key |
|||
JR Z,SHIFTKEY |
|||
CP 59H ;Is it the other SHIFT key |
|||
; CP 36H ;Is it the other SHIFT key |
|||
JR NZ,NOT_SHIFTKEY |
|||
|
|||
SHIFTKEY: |
|||
LD HL,SHIFT_MSG ;Say Shift key |
|||
CALL PRINT_STRING |
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
NOT_SHIFTKEY: |
|||
CP 14H ;Is it the CTRL key |
|||
; CP 1DH ;Is it the CTRL key |
|||
JR NZ,NOT_CTRLKEY |
|||
LD HL,CTRL_MSG ;Say CTRL key |
|||
CALL PRINT_STRING |
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
NOT_CTRLKEY: |
|||
CP 77H ;Is it the NUM LOCK key |
|||
; CP 45H ;Is it the NUM LOCK key |
|||
JR NZ,NOT_NUMKEY |
|||
LD HL,NUM_MSG ;Say Number key |
|||
CALL PRINT_STRING |
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
NOT_NUMKEY: |
|||
PUSH BC ;Save Character |
|||
LD HL,IBM1_MSG ;Say Table 1 lookup |
|||
CALL PRINT_STRING |
|||
LD HL,IBM1TBL ;Point to lookup table for upper case |
|||
CALL SHOW_CHAR |
|||
|
|||
POP BC ;Get back character |
|||
LD HL,IBM2_MSG ;Say Table 2 lookup |
|||
CALL PRINT_STRING |
|||
LD HL,IBM2TBL ;Point to lookup table for upper case |
|||
CALL SHOW_CHAR |
|||
|
|||
CALL ZCRLF |
|||
JR LOOP |
|||
|
|||
SHOW_CHAR: |
|||
LD D,0 |
|||
LD E,C |
|||
ADD HL,DE ;Add in offset |
|||
LD C,(HL) |
|||
LD A,C |
|||
CP ESC |
|||
RET Z ;ESC messes up the screen display |
|||
CP CR |
|||
RET Z ;CR messes up the screen display |
|||
CP LF |
|||
RET Z ;LF messes up the screen display |
|||
CP TAB |
|||
RET Z ;TAB messes up the screen display |
|||
CALL ZCO ;Display on Screen |
|||
RET |
|||
|
|||
KEY_IN_STATUS: ;Ret NZ if character is available |
|||
IN A,(KEY_CTRL) |
|||
AND 1 |
|||
RET ;Ret NZ if character available |
|||
|
|||
CMD_OUT: ;Send a byte (in [C]) to Control port |
|||
IN A,(KEY_CTRL) |
|||
AND 2 |
|||
JR NZ,CMD_OUT ;Chip is not ready yet to receive character |
|||
LD A,C |
|||
OUT (KEY_CTRL),A |
|||
RET |
|||
|
|||
KEY_OUT: ;Send a byte (in [C]) to Data port |
|||
IN A,(KEY_CTRL) |
|||
AND 2 |
|||
JR NZ,KEY_OUT ;Chip is not ready yet to receive character |
|||
LD A,C |
|||
OUT (KEY_DATA),A |
|||
RET |
|||
|
|||
|
|||
; A_HEXOUT ;output the 2 hex digits in [A] |
|||
A_HEXOUT: ;No registers altered |
|||
push AF |
|||
push BC |
|||
push AF |
|||
srl a |
|||
srl a |
|||
srl a |
|||
srl a |
|||
call hexdigout |
|||
pop AF |
|||
call hexdigout ;get upper nibble |
|||
LD C,' ' |
|||
call ZCO ;Space for easy reading |
|||
call ZCO |
|||
pop BC |
|||
pop AF |
|||
ret |
|||
|
|||
hexdigout: |
|||
and 0fh ;convert nibble to ascii |
|||
add a,90h |
|||
daa |
|||
adc a,40h |
|||
daa |
|||
LD c,a |
|||
call ZCO |
|||
ret |
|||
|
|||
; Main console I/O routines |
|||
; |
|||
|
|||
ZCO: |
|||
PUSH HL |
|||
LD E,C |
|||
LD C,02H ;BDOS Function 2 Write Console Byte |
|||
CALL 0005H ;Call BDOS |
|||
POP HL |
|||
RET |
|||
|
|||
ZCI: |
|||
LD C,0BH ;BDOS Function 11 Read Console Status |
|||
CALL 0005H ;Call BDOS |
|||
JP Z,ZCI |
|||
LD C,01H ;BDOS Function 1 Read Console Byte |
|||
CALL 0005H ;Call BDOS |
|||
RET |
|||
; |
|||
; Send CR/LF to Console |
|||
; |
|||
ZCRLF: |
|||
PUSH AF |
|||
PUSH BC |
|||
LD C,CR |
|||
CALL ZCO |
|||
LD C,LF |
|||
CALL ZCO |
|||
POP BC |
|||
POP AF |
|||
RET |
|||
|
|||
|
|||
PRINT_STRING: |
|||
PUSH AF |
|||
push BC |
|||
print1: |
|||
LD a,(HL) ;Point to start of string |
|||
inc HL ;By using the CS over-ride we will always have |
|||
CP '$' ;a valid pointer to messages at the end of this monitor |
|||
JP z,print2 |
|||
CP 0 ;Also terminate with 0's |
|||
JP Z,print2 |
|||
LD C,A |
|||
call ZCO |
|||
jp print1 |
|||
print2: |
|||
pop BC |
|||
POP AF |
|||
ret |
|||
|
|||
;--------------------------------------------------------------------------------------------------- |
|||
|
|||
SIGNON: |
|||
.DB CR,LF,LF |
|||
.DB "Test VT82C42 PC Keyboard & Mouse controller chip on Z80 KBDMSE Board." |
|||
.DB CR,LF,"$" |
|||
INIT_ERR_STR: |
|||
.DB CR,LF,BELL |
|||
.DB "Error: The 0xAA Test of Controller did nor return 0x55. Program Halted." |
|||
.DB CR,LF,"$" |
|||
INIT_OK: |
|||
.DB CR,LF |
|||
.DB "The 0xAA Test of Controller returned 0x55. Now enter keyboard keys." |
|||
.DB CR,LF,LF,"$" |
|||
|
|||
SCAN_MSG: |
|||
.DB "Scancode = $" |
|||
UPKEY_MSG: |
|||
.DB "(Up Keystroke)$" |
|||
CAPS_MSG: |
|||
.DB "(Caps Lock)$" |
|||
SHIFT_MSG: |
|||
.DB "(Shift Key)$" |
|||
CTRL_MSG: |
|||
.DB "(CTRL Key)$" |
|||
NUM_MSG: |
|||
.DB "(NUM Key)$" |
|||
IBM1_MSG: |
|||
.DB "Table 1 lookup -> $" |
|||
IBM2_MSG: |
|||
.DB " Table 2 lookup -> $" |
|||
|
|||
|
|||
IBM1TBL: ;The "Normal" table |
|||
;00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f |
|||
; .DB 0,"*", 0,"*","*","*","*","*", 0,"*","*","*","*",09H,"`",00H |
|||
.DB 000,027,"1","2","3","4","5","6","7","8","9","0","-","=",008,009 ;00-0F |
|||
|
|||
;10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1a, 1b, 1c, 1d, 1e, 1f |
|||
; .DB 0, 0, 0, 0, 0,"q","1", 0, 0, 0,"z","s","a","w","2",0 |
|||
.DB "q","w","e","r","t","y","u","i","o","p","[","]",013,000,"a","s" ;10-1F |
|||
|
|||
;20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2a, 2b, 2c, 2d, 2e, 2f |
|||
; .DB 0,"c","x","d","e","4","3", 0, 0," ","v","f","t","r","5",0 |
|||
.DB "d","f","g","h","j","k","l",";",27H,60H,000,092,"z","x","c","v" ;20-2F |
|||
|
|||
;30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 3a, 3b, 3c, 3d, 3e, 3f |
|||
; .DB 0,"n","b","h","g","y","6", 0, 0, 0,"m","j","u","7","8",0 |
|||
.DB "b","n","m",",",".","/",000,000,000," ",000,000,000,000,000,000 ;30-3F |
|||
|
|||
;40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4a, 4b, 4c, 4d, 4e, 4f |
|||
; .DB 0,",","k","i","o","0","9", 0, 0,".","/","l",";","p","-",0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;40-4F |
|||
|
|||
;50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5a, 5b, 5c, 5d, 5e, 5f |
|||
; .DB 0, 0,27H, 0,"[","=", 0, 0, 0, 0,0DH,"]", 0,5CH, 0,0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;50-5F |
|||
|
|||
;60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 6a, 6b, 6c, 6d, 6e, 6f |
|||
; .DB 0, 0, 0, 0, 0, 0,08H, 0, 0,11H, 0,13H,10H, 0, 0, 0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;60-6F |
|||
|
|||
;70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 7a, 7b, 7c, 7d, 7e, 7f |
|||
; .DB 0BH,7FH,03H,15H,04H,05H,1BH,00H,"*",02H,18H,16H,0CH,17H,"*",0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;70-7F |
|||
|
|||
;80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 8a, 8b, 8c, 8d, 8e, 8f |
|||
; .DB 0, 0, 0,"*", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;80-8F |
|||
|
|||
|
|||
IBM2TBL: ;If the SHIFT key or CAPS lock key is on |
|||
;00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f |
|||
; .DB 0, "*", 0,"*","*","*","*","*", 0,"*","*","*","*",09H,"~",00H |
|||
.DB 000,027,"!","@","#","$","%","^","&","*","(",")","_","+",008,009 ;00-0F |
|||
|
|||
;10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1a, 1b, 1c, 1d, 1e, 1f |
|||
; .DB 0, 0, 0, 0, 0,"Q","!", 0, 0, 0,"Z","S","A","W","@",0 |
|||
.DB "Q","W","E","R","T","Y","U","I","O","P","{","}",013,000,"A","S" ;10-1F |
|||
|
|||
;20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2a, 2b, 2c, 2d, 2e, 2f |
|||
; .DB 0,"C","X","D","E","$","#", 0, 0," ","V","F","T","R","%",0 |
|||
.DB "D","F","G","H","J","K","L",":",034,"~",000,"|","Z","X","C","V" ;20-2F |
|||
|
|||
;30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 3a, 3b, 3c, 3d, 3e, 3f |
|||
; .DB 0,"N","B","H","G","Y","^", 0, 0, 0,"M","J","U","&","*",0 |
|||
.DB "B","N","M","<",">","?",000,000,000," ",000,000,000,000,000,000 ;30-3F |
|||
|
|||
;40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 4a, 4b, 4c, 4d, 4e, 4f |
|||
; .DB 0,"<","K","I","O",29H,"(", 0, 0,">","?","L",":","P", "_",0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;40-4F |
|||
|
|||
;50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 5a, 5b, 5c, 5d, 5e, 5f |
|||
; .DB 0, 0,22H, 0,"{","+", 0, 0, 0, 0,0DH,"}", 0,"|", 0,0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;50-5F |
|||
|
|||
;60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 6a, 6b, 6c, 6d, 6e, 6f |
|||
; .DB 0, 0, 0, 0, 0, 0,08H, 0, 0,11H, 0,13H,10H, 0, 0, 0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;60-6F |
|||
|
|||
;70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 7a, 7b, 7c, 7d, 7e, 7f |
|||
; .DB 0BH,7FH,03H,15H,04H,05H,1BH,00H,"*",02H,18H,16H,0CH,17H,"*",0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;70-7F |
|||
|
|||
;80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 8a, 8b, 8c, 8d, 8e, 8f |
|||
; .DB 0, 0, 0,"*", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 |
|||
.DB 000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 ;80-8F |
|||
|
|||
|
|||
.FILL 040H,000H |
|||
STACK: .DB 0H |
|||
.FILL 19,000H |
|||
|
|||
.END |
|||
@ -0,0 +1,12 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
set TOOLS=../../../../Tools |
|||
set PATH=%TOOLS%\tasm32;%PATH% |
|||
set TASMTABS=%TOOLS%\tasm32 |
|||
|
|||
tasm -t180 -g3 -fFF vdctest.asm vdctest.com vdctest.lst || exit /b |
|||
tasm -t180 -g3 -fFF vdconly.asm vdconly.com vdconly.lst || exit /b |
|||
|
|||
copy /Y vdctest.com ..\..\..\..\Binary\Apps\Test\ || exit /b |
|||
copy /Y vdconly.com ..\..\..\..\Binary\Apps\Test\ || exit /b |
|||
@ -0,0 +1,6 @@ |
|||
@echo off |
|||
setlocal |
|||
|
|||
if exist *.com del *.com |
|||
if exist *.lst del *.lst |
|||
if exist *.bin del *.bin |
|||
@ -0,0 +1,7 @@ |
|||
OBJECTS = vdctest.com vdconly.com |
|||
DEST = ../../../../Binary/Apps/Test |
|||
TOOLS =../../../../Tools |
|||
|
|||
USETASM=1 |
|||
|
|||
include $(TOOLS)/Makefile.inc |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -0,0 +1,51 @@ |
|||
# |
|||
# Add ZSystem images |
|||
# |
|||
../BPBIOS/*.img 0: |
|||
../BPBIOS/*.rel 0: |
|||
../BPBIOS/*.zrl 0: |
|||
../BPBIOS/*.zex 0: |
|||
../BPBIOS/bpbuild.com 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 15: |
|||
../../Binary/Apps/assign.com 15: |
|||
../../Binary/Apps/fat.com 15: |
|||
../../Binary/Apps/fdu.com 15: |
|||
../../Binary/Apps/fdu.doc 15: |
|||
../../Binary/Apps/format.com 15: |
|||
../../Binary/Apps/mode.com 15: |
|||
../../Binary/Apps/rtc.com 15: |
|||
../../Binary/Apps/survey.com 15: |
|||
../../Binary/Apps/syscopy.com 15: |
|||
../../Binary/Apps/sysgen.com 15: |
|||
../../Binary/Apps/talk.com 15: |
|||
../../Binary/Apps/tbasic.com 15: |
|||
../../Binary/Apps/timer.com 15: |
|||
../../Binary/Apps/tune.com 15: |
|||
../../Binary/Apps/xm.com 15: |
|||
../../Binary/Apps/zmp.com 15: |
|||
../../Binary/Apps/zmp.hlp 15: |
|||
../../Binary/Apps/zmp.doc 15: |
|||
../../Binary/Apps/zmxfer.ovr 15: |
|||
../../Binary/Apps/zmterm.ovr 15: |
|||
../../Binary/Apps/zminit.ovr 15: |
|||
../../Binary/Apps/zmconfig.ovr 15: |
|||
../../Binary/Apps/zmd.com 15: |
|||
# |
|||
# Add Tune sample files |
|||
# |
|||
../../Binary/Apps/Tunes/*.pt? 3: |
|||
../../Binary/Apps/Tunes/*.mym 3: |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 15: |
|||
Common/CPM22/*.* 15: |
|||
#Common/Z/u10/*.* 10: |
|||
Common/Z/u14/*.* 14: |
|||
Common/Z/u15/*.* 15: |
|||
Common/Z3/u10/*.* 10: |
|||
Common/Z3/u14/*.* 14: |
|||
Common/Z3/u15/*.* 15: |
|||
@ -0,0 +1,45 @@ |
|||
# |
|||
# Add the ReadMe document |
|||
# |
|||
d_cpm22/ReadMe.txt 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 0: |
|||
../../Binary/Apps/assign.com 0: |
|||
../../Binary/Apps/fat.com 0: |
|||
../../Binary/Apps/fdu.com 0: |
|||
../../Binary/Apps/fdu.doc 0: |
|||
../../Binary/Apps/format.com 0: |
|||
../../Binary/Apps/mode.com 0: |
|||
../../Binary/Apps/rtc.com 0: |
|||
../../Binary/Apps/survey.com 0: |
|||
../../Binary/Apps/syscopy.com 0: |
|||
../../Binary/Apps/sysgen.com 0: |
|||
../../Binary/Apps/talk.com 0: |
|||
../../Binary/Apps/tbasic.com 0: |
|||
../../Binary/Apps/timer.com 0: |
|||
../../Binary/Apps/tune.com 0: |
|||
../../Binary/Apps/xm.com 0: |
|||
../../Binary/Apps/zmp.com 0: |
|||
../../Binary/Apps/zmp.hlp 0: |
|||
../../Binary/Apps/zmp.doc 0: |
|||
../../Binary/Apps/zmxfer.ovr 0: |
|||
../../Binary/Apps/zmterm.ovr 0: |
|||
../../Binary/Apps/zminit.ovr 0: |
|||
../../Binary/Apps/zmconfig.ovr 0: |
|||
../../Binary/Apps/zmd.com 0: |
|||
# |
|||
# Add Tune sample files |
|||
# |
|||
../../Binary/Apps/Tunes/*.pt? 3: |
|||
../../Binary/Apps/Tunes/*.mym 3: |
|||
# |
|||
# Add OS image |
|||
# |
|||
../CPM22/cpm_wbw.sys 0:cpm.sys |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 0: |
|||
Common/CPM22/*.* 0: |
|||
@ -0,0 +1,52 @@ |
|||
# |
|||
# Add files from CPM3 build |
|||
# |
|||
../CPM3/cpmldr.com 0: |
|||
../CPM3/cpmldr.sys 0: |
|||
../CPM3/ccp.com 0: |
|||
../CPM3/gencpm.com 0: |
|||
../CPM3/genres.dat 0: |
|||
../CPM3/genbnk.dat 0: |
|||
../CPM3/bios3.spr 0: |
|||
../CPM3/bnkbios3.spr 0: |
|||
../CPM3/bdos3.spr 0: |
|||
../CPM3/bnkbdos3.spr 0: |
|||
../CPM3/resbdos3.spr 0: |
|||
../CPM3/cpm3res.sys 0: |
|||
../CPM3/cpm3bnk.sys 0: |
|||
../CPM3/gencpm.dat 0: |
|||
../CPM3/cpm3.sys 0: |
|||
../CPM3/readme.1st 0: |
|||
../CPM3/cpm3fix.pat 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 0: |
|||
../../Binary/Apps/assign.com 0: |
|||
../../Binary/Apps/fat.com 0: |
|||
../../Binary/Apps/fdu.com 0: |
|||
../../Binary/Apps/fdu.doc 0: |
|||
../../Binary/Apps/format.com 0: |
|||
../../Binary/Apps/mode.com 0: |
|||
../../Binary/Apps/rtc.com 0: |
|||
../../Binary/Apps/survey.com 0: |
|||
../../Binary/Apps/syscopy.com 0: |
|||
#../../Binary/Apps/sysgen.com 0: |
|||
#../../Binary/Apps/talk.com 0: |
|||
../../Binary/Apps/tbasic.com 0: |
|||
../../Binary/Apps/timer.com 0: |
|||
../../Binary/Apps/tune.com 0: |
|||
../../Binary/Apps/xm.com 0: |
|||
../../Binary/Apps/zmp.com 0: |
|||
../../Binary/Apps/zmp.hlp 0: |
|||
../../Binary/Apps/zmp.doc 0: |
|||
../../Binary/Apps/zmxfer.ovr 0: |
|||
../../Binary/Apps/zmterm.ovr 0: |
|||
../../Binary/Apps/zminit.ovr 0: |
|||
../../Binary/Apps/zmconfig.ovr 0: |
|||
../../Binary/Apps/zmd.com 0: |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 0: |
|||
Common/CPM3/*.* 0: |
|||
@ -0,0 +1,31 @@ |
|||
# |
|||
# Add the ReadMe document |
|||
# |
|||
d_nzcom/ReadMe.txt 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 0: |
|||
../../Binary/Apps/assign.com 0: |
|||
../../Binary/Apps/fat.com 0: |
|||
../../Binary/Apps/fdu.com 0: |
|||
../../Binary/Apps/rtc.com 0: |
|||
../../Binary/Apps/syscopy.com 0: |
|||
../../Binary/Apps/talk.com 0: |
|||
../../Binary/Apps/timer.com 0: |
|||
../../Binary/Apps/xm.com 0: |
|||
# |
|||
# Add OS images |
|||
# |
|||
../ZSDOS/zsys_wbw.sys 0:zsys.sys |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 0: |
|||
Common/CPM22/*.* 0: |
|||
#Common/Z/u10/*.* 0: |
|||
Common/Z/u14/*.* 0: |
|||
Common/Z/u15/*.* 0: |
|||
Common/Z3/u10/*.* 0: |
|||
Common/Z3/u14/*.* 0: |
|||
Common/Z3/u15/*.* 0: |
|||
@ -0,0 +1,49 @@ |
|||
# |
|||
# Add files from ZPM3 build |
|||
# |
|||
../ZPM3/zpmldr.com 0: |
|||
../ZPM3/zpmldr.sys 0: |
|||
../CPM3/cpmldr.com 0: |
|||
../CPM3/cpmldr.sys 0: |
|||
../ZPM3/autotog.com 15: |
|||
../ZPM3/clrhist.com 15: |
|||
../ZPM3/setz3.com 15: |
|||
../ZPM3/cpm3.sys 0: |
|||
../ZPM3/zccp.com 0: |
|||
../ZPM3/zinstal.zpm 0: |
|||
../ZPM3/startzpm.com 0: |
|||
../ZPM3/makedos.com 0: |
|||
../ZPM3/gencpm.dat 0: |
|||
../ZPM3/bnkbios3.spr 0: |
|||
../ZPM3/bnkbdos3.spr 0: |
|||
../ZPM3/resbdos3.spr 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 15: |
|||
../../Binary/Apps/assign.com 15: |
|||
../../Binary/Apps/fat.com 15: |
|||
../../Binary/Apps/fdu.com 15: |
|||
../../Binary/Apps/fdu.doc 15: |
|||
../../Binary/Apps/format.com 15: |
|||
../../Binary/Apps/mode.com 15: |
|||
../../Binary/Apps/rtc.com 15: |
|||
../../Binary/Apps/survey.com 15: |
|||
../../Binary/Apps/syscopy.com 15: |
|||
../../Binary/Apps/sysgen.com 15: |
|||
../../Binary/Apps/talk.com 15: |
|||
../../Binary/Apps/tbasic.com 15: |
|||
../../Binary/Apps/timer.com 15: |
|||
../../Binary/Apps/tune.com 15: |
|||
../../Binary/Apps/xm.com 15: |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 15: |
|||
Common/CPM3/*.* 15: |
|||
#Common/Z/u10/*.* 10: |
|||
Common/Z/u14/*.* 14: |
|||
Common/Z/u15/*.* 15: |
|||
Common/Z3/u10/*.* 10: |
|||
Common/Z3/u14/*.* 14: |
|||
Common/Z3/u15/*.* 15: |
|||
@ -0,0 +1,61 @@ |
|||
# |
|||
# Add the ReadMe document |
|||
# |
|||
d_zsdos/ReadMe.txt 0: |
|||
# |
|||
# Include selected CP/M 2.2 files |
|||
# |
|||
d_cpm22/u0/ASM.COM 0: |
|||
d_cpm22/u0/LIB.COM 0: |
|||
d_cpm22/u0/LINK.COM 0: |
|||
d_cpm22/u0/LOAD.COM 0: |
|||
d_cpm22/u0/MAC.COM 0: |
|||
#d_cpm22/u0/PIP.COM 0: ??? |
|||
d_cpm22/u0/RMAC.COM 0: |
|||
d_cpm22/u0/STAT.COM 0: |
|||
d_cpm22/u0/SUBMIT.COM 0: |
|||
d_cpm22/u0/XSUB.COM 0: |
|||
# |
|||
# Add RomWBW utilities |
|||
# |
|||
#../../Binary/Apps/*.com 0: |
|||
../../Binary/Apps/assign.com 0: |
|||
../../Binary/Apps/fat.com 0: |
|||
../../Binary/Apps/fdu.com 0: |
|||
../../Binary/Apps/fdu.doc 0: |
|||
../../Binary/Apps/format.com 0: |
|||
../../Binary/Apps/mode.com 0: |
|||
../../Binary/Apps/rtc.com 0: |
|||
../../Binary/Apps/survey.com 0: |
|||
../../Binary/Apps/syscopy.com 0: |
|||
../../Binary/Apps/sysgen.com 0: |
|||
../../Binary/Apps/talk.com 0: |
|||
../../Binary/Apps/tbasic.com 0: |
|||
../../Binary/Apps/timer.com 0: |
|||
../../Binary/Apps/tune.com 0: |
|||
../../Binary/Apps/xm.com 0: |
|||
../../Binary/Apps/zmp.com 0: |
|||
../../Binary/Apps/zmp.hlp 0: |
|||
../../Binary/Apps/zmp.doc 0: |
|||
../../Binary/Apps/zmxfer.ovr 0: |
|||
../../Binary/Apps/zmterm.ovr 0: |
|||
../../Binary/Apps/zminit.ovr 0: |
|||
../../Binary/Apps/zmconfig.ovr 0: |
|||
../../Binary/Apps/zmd.com 0: |
|||
# |
|||
# Add Tune sample files |
|||
# |
|||
../../Binary/Apps/Tunes/*.pt? 3: |
|||
../../Binary/Apps/Tunes/*.mym 3: |
|||
# |
|||
# Add OS image |
|||
# |
|||
../ZSDOS/zsys_wbw.sys 0:zsys.sys |
|||
# |
|||
# Add Common Applications |
|||
# |
|||
Common/All/*.* 0: |
|||
Common/CPM22/*.* 0: |
|||
#Common/Z/u10/*.* 0: |
|||
Common/Z/u14/*.* 0: |
|||
Common/Z/u15/*.* 0: |
|||
Loading…
Reference in new issue