mirror of
https://github.com/wwarthen/RomWBW.git
synced 2026-02-06 14:11:48 -06:00
Heath H8 Panel Tweaks
- Notify HBIOS of speed changes (keeps HBIOS in sync with panel) - Correct display for HL, SP, and PC registers.
This commit is contained in:
@@ -25,6 +25,7 @@ pushd piomon && call Build || exit /b & popd
|
||||
pushd banktest && call Build || exit /b & popd
|
||||
pushd portscan && call Build || exit /b & popd
|
||||
pushd sound && call Build || exit /b & popd
|
||||
pushd testh8p && call Build || exit /b & popd
|
||||
|
||||
goto :eof
|
||||
|
||||
|
||||
@@ -22,3 +22,4 @@ pushd piomon && call Clean || exit /b 1 & popd
|
||||
pushd banktest && call Clean || exit /b 1 & popd
|
||||
pushd portscan && call Clean || exit /b 1 & popd
|
||||
pushd sound && call Clean || exit /b 1 & popd
|
||||
pushd testh8p && call Clean || exit /b 1 & popd
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
OBJECTS =
|
||||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan sound
|
||||
SUBDIRS = DMAmon I2C inttest ppidetst ramtest tstdskng rzsz vdctest kbdtest ps2info 2piotst piomon banktest portscan sound testh8p
|
||||
DEST = ../../../Binary/Apps/Test
|
||||
TOOLS =../../../Tools
|
||||
|
||||
|
||||
10
Source/Apps/Test/testh8p/Build.cmd
Normal file
10
Source/Apps/Test/testh8p/Build.cmd
Normal file
@@ -0,0 +1,10 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
set TOOLS=../../../../Tools
|
||||
set PATH=%TOOLS%\tasm32;%PATH%
|
||||
set TASMTABS=%TOOLS%\tasm32
|
||||
|
||||
tasm -t80 -g3 -fFF testh8p.asm testh8p.com testh8p.lst || exit /b
|
||||
|
||||
copy /Y testh8p.com ..\..\..\..\Binary\Apps\Test\ || exit /b
|
||||
6
Source/Apps/Test/testh8p/Clean.cmd
Normal file
6
Source/Apps/Test/testh8p/Clean.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
setlocal
|
||||
|
||||
if exist *.com del *.com
|
||||
if exist *.lst del *.lst
|
||||
if exist *.bin del *.bin
|
||||
9
Source/Apps/Test/testh8p/Makefile
Normal file
9
Source/Apps/Test/testh8p/Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
OBJECTS = testh8p.com
|
||||
# DOCS = testh8p.doc
|
||||
DEST = ../../../../Binary/Apps/Test
|
||||
DOCDEST = ../../../../Binary/Apps/Test
|
||||
TOOLS =../../../../Tools
|
||||
|
||||
USETASM=1
|
||||
|
||||
include $(TOOLS)/Makefile.inc
|
||||
238
Source/Apps/Test/testh8p/testh8p.asm
Normal file
238
Source/Apps/Test/testh8p/testh8p.asm
Normal file
@@ -0,0 +1,238 @@
|
||||
;===============================================================================
|
||||
; H8 Panel Test
|
||||
;===============================================================================
|
||||
;
|
||||
; AUTHOR: WAYNE WARTHEN (wwarthen@gmail.com)
|
||||
;_______________________________________________________________________________
|
||||
;
|
||||
;
|
||||
; Trivial utility to test the register pair display functionality of the
|
||||
; Heath H8 Front Panel.
|
||||
;
|
||||
; Program will display a set of known register values on the console,
|
||||
; then go into an infinite loop. The H8 panel can then be checked to
|
||||
; see if the correct values are displayed.
|
||||
;
|
||||
; There is no way to exit this program. You must reset your system.
|
||||
;
|
||||
;===============================================================================
|
||||
; Definitions
|
||||
;===============================================================================
|
||||
;
|
||||
stksiz .equ $40 ; Working stack size
|
||||
;
|
||||
restart .equ $0000 ; CP/M restart vector
|
||||
bdos .equ $0005 ; BDOS invocation vector
|
||||
;
|
||||
regA .equ $11
|
||||
regBC .equ $2233
|
||||
regDE .equ $4455
|
||||
regHL .equ $6677
|
||||
;
|
||||
;===============================================================================
|
||||
; Code Section
|
||||
;===============================================================================
|
||||
;
|
||||
;
|
||||
.org $100
|
||||
;
|
||||
; setup stack (save old value)
|
||||
ld (stksav),sp ; save stack
|
||||
ld sp,stack ; set new stack
|
||||
;
|
||||
ld de,str_prefix
|
||||
call prtstr
|
||||
;
|
||||
ld de,str_A
|
||||
ld hl,regA
|
||||
call prtreg
|
||||
ld de,str_BC
|
||||
ld hl,regBC
|
||||
call prtreg
|
||||
ld de,str_DE
|
||||
ld hl,regDE
|
||||
call prtreg
|
||||
ld de,str_HL
|
||||
ld hl,regHL
|
||||
call prtreg
|
||||
ld de,str_SP
|
||||
ld hl,regSP
|
||||
call prtreg
|
||||
ld de,str_PC
|
||||
ld hl,regPC
|
||||
call prtreg
|
||||
;
|
||||
ld a,regA
|
||||
ld bc,regBC
|
||||
ld de,regDE
|
||||
ld hl,regHL
|
||||
regPC: jr $
|
||||
;
|
||||
;
|
||||
;
|
||||
prtreg:
|
||||
call prtstr ; print label
|
||||
ld a,h ; first byte
|
||||
call prtoctbyte ; print it
|
||||
ld a,'.' ; separator
|
||||
call prtchr ; print it
|
||||
ld a,l ; second byte
|
||||
call prtoctbyte ; print it
|
||||
ret
|
||||
;
|
||||
;
|
||||
;
|
||||
prtoctbyte:
|
||||
rlca ; 2 ms bits
|
||||
rlca
|
||||
push af
|
||||
and %00000011 ; isolate
|
||||
add a,'0' ; make char
|
||||
call prtchr ; show it
|
||||
pop af
|
||||
rlca ; next 3 bits
|
||||
rlca
|
||||
rlca
|
||||
push af
|
||||
and %00000111 ; isolate
|
||||
add a,'0' ; make char
|
||||
call prtchr ; show it
|
||||
pop af
|
||||
rlca ; next 3 bits
|
||||
rlca
|
||||
rlca
|
||||
push af
|
||||
and %00000111 ; isolate
|
||||
add a,'0' ; make char
|
||||
call prtchr ; show it
|
||||
pop af
|
||||
ret
|
||||
;
|
||||
; 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
|
||||
;
|
||||
; Print a zero terminated string at (DE) without destroying any registers
|
||||
;
|
||||
prtstr:
|
||||
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
|
||||
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
|
||||
;
|
||||
; Print the value in A in hex without destroying any registers
|
||||
;
|
||||
prthex:
|
||||
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:
|
||||
push af
|
||||
ld a,h
|
||||
call prthex
|
||||
ld a,l
|
||||
call prthex
|
||||
pop af
|
||||
ret
|
||||
;
|
||||
; print the hex dword value in de:hl
|
||||
;
|
||||
prthex32:
|
||||
push bc
|
||||
push de
|
||||
pop bc
|
||||
call prthexword
|
||||
push hl
|
||||
pop bc
|
||||
call prthexword
|
||||
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
|
||||
;
|
||||
;===============================================================================
|
||||
; Storage Section
|
||||
;===============================================================================
|
||||
;
|
||||
rtcbuf .fill 6,$FF ; RTC data buffer
|
||||
;
|
||||
str_prefix .db "\r\n\r\nRegisters: ",0
|
||||
;
|
||||
str_A .db "A=",0
|
||||
str_BC .db ", BC=",0
|
||||
str_DE .db ", DE=",0
|
||||
str_HL .db ", HL=",0
|
||||
str_SP .db ", SP=",0
|
||||
str_PC .db ", PC=",0
|
||||
;
|
||||
stksav .dw 0 ; stack pointer saved at start
|
||||
.fill stksiz,0 ; stack
|
||||
stack .equ $ ; stack top
|
||||
regSP:
|
||||
;
|
||||
.end
|
||||
Reference in New Issue
Block a user