-;\r
-\r
-\r
-; ---------------- Defines for the Virtual peripherial interface -------
-
-;The hw is modelled to make writing a CPM BIOS easier.
-;Ports:
-;0 - Con status. Returns 0xFF if the UART has a byte, 0 otherwise.
-;1 - Console input, aka UDR.
-;2 - Console output
-;3 - "UART" status: bit 0=rx, bit 1 = tx
-;4 - "UART" data register, no wait
-;15 - Disk select
-;16,17 - Track select
-;18 - Sector select
-;20 - Write addr l
-;21 - Write addr h
-;22 - Trigger - write to read, to write a sector using the above info;
-; , write to allocated/dirctory/unallocated
-
-;----------------------------------------------- Start of Data Segment
-
- .dseg\r
-\r
-\r
+;
+
+
+;
+; 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
+;
+;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)
+;
+;40 64-71 in/out - Timer/Clock controll.
+;46
+
+