DragonVM/extra/dss/sdk/bios_api.dss

226 lines
6.3 KiB
Text

## --
## -- This file is automatically generated by the DragonAssembler (version 0.4.1649)
## -- Please do not modify this file in any way.
## --
## These are the base addresses of the memory map.
@group MemoryAddresses
MBR 0x1380
INT_VEC 0x1080
DISK_INTERFACE 0x1580
RAM 0x1740
CMOS 0x1000
VGA 0x1600
KEYBOARD 0x1280
@end
## --
## These are the addresses of CMOS data.
@group CMOS_Settings
MEM_START { MemoryAddresses.CMOS + 0x0000 }
MEM_SIZE { MemoryAddresses.CMOS + 0x0002 }
CLOCK_SPEED { MemoryAddresses.CMOS + 0x0004 }
SCREEN_REDRAW_RATE { MemoryAddresses.CMOS + 0x0006 }
SCREEN_WIDTH { MemoryAddresses.CMOS + 0x0007 }
SCREEN_HEIGHT { MemoryAddresses.CMOS + 0x0009 }
BOOT_DISK { MemoryAddresses.CMOS + 0x0010 }
STACK_SIZE { MemoryAddresses.CMOS + 0x0011 }
DISK_LIST { MemoryAddresses.CMOS + 0x007E }
@end
## --
## These are the FLAG addresses.
@group Flags
InterruptsEnabled 0x00
OffsetModeEnabled 0x01
@end
## --
## These are the Hardware Interrupt codes of this machine.
@group HW_Int
DISK_INTERFACE_FINISHED 0x80
KEY_PRESSED 0xA0
KEY_RELEASED 0xA1
TEXT_ENTERED 0xA2
TEXT16_SCREEN_REFRESHED 0xE0
@end
## --
## These are the memory-mapped registers used to interact with the video card's interface.
@group VGA_Registers
VIDEO_MODE { MemoryAddresses.VGA + 0x0000 }
CLEAR_COLOR { MemoryAddresses.VGA + 0x0001 }
PALETTE { MemoryAddresses.VGA + 0x0002 }
SIGNAL { MemoryAddresses.VGA + 0x0003 }
TEXT_SINGLE_CHAR { MemoryAddresses.VGA + 0x0004 }
TEXT_SIGNLE_INVERT { MemoryAddresses.VGA + 0x0005 }
TEXT_SIGNLE_STR { MemoryAddresses.VGA + 0x0006 }
FLAGS { MemoryAddresses.VGA + 0x007E }
MEMORY_CONTROLLER_X { MemoryAddresses.VGA + 0x0080 }
MEMORY_CONTROLLER_X_BYTE { MemoryAddresses.VGA + 0x0080 + 1 }
MEMORY_CONTROLLER_Y { MemoryAddresses.VGA + 0x0082 }
MEMORY_CONTROLLER_Y_BYTE { MemoryAddresses.VGA + 0x0082 + 1 }
MEMORY_CONTROLLER_CHAR { MemoryAddresses.VGA + 0x0084 }
MEMORY_CONTROLLER_BG_COL { MemoryAddresses.VGA + 0x0085 }
MEMORY_CONTROLLER_FG_COL { MemoryAddresses.VGA + 0x0086 }
BUFF_START { MemoryAddresses.VGA + 0x00E0 }
@end
## --
## These are the memory-mapped registers used to interact with the keyboard's interface.
@group Keyboard_Registers
MODIFIERS_BITFIELD { MemoryAddresses.KEYBOARD + 0x0000 }
KEYCODE { MemoryAddresses.KEYBOARD + 0x0002 }
@end
## --
## These are the different Video Modes that the video card supports.
@group VGA_VideoModes
TEXT_SINGLE_COLOR 0x00
TEXT_16_COLORS 0x01
@end
## --
## These are signals used to comunicate with the video card's interface, when in TEXT_SINGLE_COLOR mode.
@group Sig_VGA_Text_Single_Color
CONTINUE 0x00
PRINT_CHAR 0x02
STORE_CHAR 0x03
PRINT_FLUSH_BUFF 0x04
FLUSH_BUFF 0x05
PRINT_BUFF 0x06
PRINT_STRING 0x07
REFRESH_SCREEN 0xE0
CLEAR_SCREEN 0xE1
REDRAW_SCREEN 0xE2
@end
## --
## These are signals used to comunicate with the video card's interface, when in TEXT16_COLOR mode.
@group Sig_VGA_Text_16_Color
CONTINUE 0x00
SWAP_BUFFERS 0x10
WRITE_VRAM 0x11
SCROLL 0x12
FORCE_REFRESH_SCREEN 0xE0
FORCE_CLEAR_SCREEN 0xE1
FORCE_REDRAW_SCREEN 0xE2
@end
## --
## Structure of a DPT (Dragon Partition Table).
@group DPTStructure
DISK_ADDR 0x0200
ENTRIES_START 0x000C
ENTRY_START_ADDR 0x0000
ENTRY_PART_SIZE 0x0004
ENTRY_FLAGS 0x0008
ENTRY_PART_LBL 0x0024
ID_CODE 0xF1CA
ENTRY_SIZE_B 100
@end
## --
## Structure of a Bootable partitions (Dragon Partition Table).
@group DPTBootPartStructure
ID_ADDR 0x0000
CODE_START 0x0020
ID_CODE 0xF1C4
CODE_SIZE_B 1024
HEADER_SIZE_B 32
CODE_LOAD_ADDR 0x2C00
@end
## --
## Structure to store a DPT block.
@struct DPTBlock
ID:2
VersionMaj:1
VersionMin:1
PartCount:1
Reserved:7
Entries:500
@end
## --
## Structure to store a DPT Partition block.
@struct DPTPartitionBlock
StartAddress:4
Size:4
Flags:2
Reserved:26
Label:64
@end
## --
## Structure to store a character cell for the Text16-Video-Mode.
@struct Text16VModeCell
Character:1
Foreground:1
Background:1
CoordX:1
CoordY:1
@end
## --
## Debugger Profiler time units.
@group DBGProfilerTime
MILLIS 0x00
SECS 0x01
MICROS 0x02
NANOS 0x03
@end
## --
## Disk driver modes.
@group DiskMode
READ 0x00
WRITE 0x01
@end
## --
## Disk driver signals.
@group DiskSignals
START 0x00
CANCEL 0x01
IGNORE 0xFF
@end
## --
## Disk driver status.
@group DiskStatus
FREE 0x00
WRITING 0x01
READING 0x02
@end
## --
## Disk driver registers.
@group DiskRegisters
SIGNAL 0x00
MODE_SELECTOR 0x01
DISK_SELECTOR 0x02
SECTOR_SELECTOR 0x03
ADDRESS_SELECTOR 0x05
DATA_SIZE 0x07
MEMORY_ADDRESS 0x09
RO_STATUS 0x0B
RO_CURRENT_DISK 0x0C
RO_CURRENT_SECTOR 0x0D
RO_CURRENT_ADDRESS 0x0F
RO_REST_DATA_SIZE 0x11
RO_MEMORY_ADDRESS 0x13
@end
## --
## Disk driver data structure.
@struct DiskDriverData
Mode:1 > 0x00
Disk:1 > 0x00
Sector:2 > 0x00, 0x00
Address:2 > 0x00, 0x00
DataSize:2 > 0x00, 0x00
MemoryAddress:2 > 0x00, 0x00
@end
## --