X-Git-Url: http://cloudbase.mooo.com/gitweb/avrcpm.git/blobdiff_plain/8cfe62c35bd287bdb1c6cd1fedf168d76a92939e..d8fa6a36ffba80be398c90641b3e7e7a79d56d43:/cpm/CFGACPM.LIB diff --git a/cpm/CFGACPM.LIB b/cpm/CFGACPM.LIB index 6f30879..7c2f7d0 100644 --- a/cpm/CFGACPM.LIB +++ b/cpm/CFGACPM.LIB @@ -29,11 +29,80 @@ iobyte equ 0003h ;intel iobyte buff equ 0080h ;default buffer address retry equ 3 ;max retries on disk i/o before error + +;copy from avr/virt_ports.asm: +; Port Direction Function +;hex dez +;------------------------------------------------------------------------- +;00 0 in - Con status. +; Returns 0xFF if the UART has a byte, 0 otherwise. +;01 1 in/out - Console input, aka UDR. / Console Output +;02 2 out - Console Output (deprecated) +;03 3 in - "UART" status: bit 0 = rx, bit 1 = tx +;04 4 in - "UART" data register, no wait +; +;------------------------ Virtual I2C interface -------------------------- +;05 5 out - Control Port: 1 = Start read operation +; 2 = Start write operation +;05 5 in - Status of last Transfer: 0 = ok, else fail +;06 6 in/out - Number of bytes to transfer, including Slave address +;07,08 7,8 in/out - Read/Write address low/high +; +;------------------------ Disk I/O --------------------------------------- +;0D,0E 13,14 in/out - Set address of Bios Controll Block +;0F 15 in/out - Disk select +;10,11 16,17 in/out - Track select +;12,13 18,19 in/out - Sector select +;14,15 20,21 in/out - Write addr +; +;16 22 out - Trigger disk i/o operations +; Bit 7 = 1: Read sector +; Bit 6 = 1: Write sector +; Bit 5 = 1: BIOS WBOOT +; Bit 4 = 1: BIOS Home +; Only one of bits 4..7 may be set. +; If Write function (bit 6=1): +; Bits 0..2: 0 - write to allocated +; 1 - write to directory +; 2 - write unallocated +; 3 - write to directory +; +;16 22 in - Result of last read/write operation. +; 0x00 = ok, 0xff = error (--> Bad Sector) +; +; +; +;------------------------ Wall Clock and Timers -------------------------- +;40 64-71 in/out - Timer/Clock control. +;41-46 +; +;47-4D clock - BCD format: ss, mm, hh, DD, MM, YYl, YYh +; +;------------------------ Ports ------------------------------------------ +;80-87 in/out - Port-Expander PCF8574 (max. 8 Chips) +;88-8F in/out - Port-Expander PCF8574A (not implemented yet!) + + READ_FUNC equ 7 WRITE_FUNC equ 6 BOOT_FUNC equ 5 HOME_FUNC equ 4 -cr equ 13 -lf equ 10 +TIMERCTL equ 040h +TIMER_MSECS equ TIMERCTL+1 +TIMER_SECS equ TIMER_MSECS+2 +starttimercmd equ 1 +quitTimerCmd equ 2 +printTimerCmd equ 15 +uptimeCmd equ 16 + +CLOCKPORT equ TIMERCTL+7 + +DEBUGPORT equ 04FH +StartTraceCmd equ 1 +StopTraceCmd equ 0 + + + +