feat(bios): split apart MEMTEST EF and CHIBIO BIOS interface
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
; CHIBI PC-09 Prototype #1 -- BIOS Utilities Header
|
||||
; CHIBI PC-09 Prototype #1 -- BIOS Interface Header
|
||||
; Copyright (c) 2025 Amber Zeller, Gale Faraday
|
||||
; Licensed under MIT
|
||||
|
||||
; vim: ft=asm
|
||||
|
||||
ROBIT IMPORT
|
||||
PRINTVER IMPORT
|
||||
CHIBIO IMPORT
|
||||
28
src/biosint.s
Normal file
28
src/biosint.s
Normal file
@@ -0,0 +1,28 @@
|
||||
; CHIBI PC-09 Prototype #1 Boot ROM -- BIOS Interface
|
||||
; Copyright (c) 2024-2025 Amber Zeller, Gale Faraday
|
||||
; Licensed under MIT
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; CHIBI/O Stable BIOS Interface
|
||||
;;
|
||||
;; Called through SWI3
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
SECTION BIOSINT
|
||||
|
||||
EXPORT CHIBIO
|
||||
|
||||
; CHIBI/O Entrypoint -- Stable, but defined by linkerscript $8800
|
||||
; @param A: Function ID
|
||||
CHIBIO
|
||||
tfr a,d ; 8-to-16 tfr, fill both a and b
|
||||
clra ; Clear MSB
|
||||
asld ; Convert to word offset
|
||||
tfr d,x ; Put in X for indexing mode
|
||||
jmp [CHIBIOPTRTBL,x] ; Jump!
|
||||
|
||||
; Jump table TODO: Document function IDs and pointers
|
||||
CHIBIOPTRTBL
|
||||
fdb $8000 ; TODO Implement BIOS function wrappers (serial, etc)
|
||||
@@ -1,62 +1,21 @@
|
||||
; CHIBI PC-09 Prototype #1 Boot ROM -- BIOS Utilities
|
||||
; CHIBI PC-09 Prototype #1 Boot ROM -- Onboard Programs or BUZBEE "EFs"
|
||||
; Copyright (c) 2024-2025 Amber Zeller, Gale Faraday
|
||||
; Licensed under MIT
|
||||
|
||||
; These are onboard programs with fixed locations in the linkerscript for
|
||||
; starting from a machine language monitor
|
||||
|
||||
INCLUDE "hardware.inc"
|
||||
INCLUDE "serial.inc"
|
||||
INCLUDE "version.inc"
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; CHIBI/O Stable BIOS Interface
|
||||
;;
|
||||
;; Called through SWI3
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
SECTION BIOSINT
|
||||
|
||||
EXPORT CHIBIO
|
||||
|
||||
; CHIBI/O Entrypoint -- Stable, but defined by linkerscript $8800
|
||||
; @param A: Function ID
|
||||
CHIBIO
|
||||
tfr a,d ; 8-to-16 tfr, fill both a and b
|
||||
clra ; Clear MSB
|
||||
asld ; Convert to word offset
|
||||
tfr d,x ; Put in X for indexing mode
|
||||
jmp [CHIBIOPTRTBL,x] ; Jump!
|
||||
|
||||
; Jump table TODO: Document function IDs and pointers
|
||||
CHIBIOPTRTBL
|
||||
fdb IOPRINTVER ; Print the firmware version string
|
||||
fdb $0000 ; TODO: Interactive BIOS setup utilitiy call
|
||||
fdb ROBIT ; Access the ROBIT memory test
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; CHIBI/O Function Implementations
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
; Prints the firmware's version information
|
||||
IOPRINTVER
|
||||
PZSTR VERMSG
|
||||
rti
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; Memory Testing Routines
|
||||
;;
|
||||
;; This family of BIOS routines does not return, upon completion the CHIBI must
|
||||
;; be reset.
|
||||
;; Memory Testing Routine
|
||||
;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
SECTION MEMTEST
|
||||
|
||||
EXPORT ROBIT
|
||||
|
||||
; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for
|
||||
; MIKBUG.
|
||||
ROBIT
|
||||
Reference in New Issue
Block a user