Os_data.inc
[ Return to Browse Source Page ]
; OS_Data.inc

commandtable dd (offset command_dir),     (offset prompt_tmp_dir)
             dd (offset command_root),    (offset prompt_root)
             dd (offset command_cd),      (offset prompt_cd)
             dd (offset command_help1),   (offset prompt_help)
             dd (offset command_help2),   (offset prompt_help)
             dd (offset command_cls),     (offset clearscreen)
             dd (offset command_err),     (offset prompt_err)
             dd (offset command_sn),      (offset change_sn)
             dd (offset command_del),     (offset do_test_delay)
             dd (offset command_reboot),  (offset kbd_reset)
             dd 0

hd_params dw 01F0h
          dw 0170h
          dw 01E8h
          dw 0168h
cpu_fault_msg db "You've Faulted the CPU Again (you dork).",0Dh,0
memory_init2 db " kb",0Dh,0
video_init_str db 0FFh,07h,"Initializing system...",0FFh,0FFh,0Dh
               db " Video...VGA OK", 0Dh,0
kbd_init_str   db " Keyboard...",0;
kbd_init_mfii  db "MF-II ",0
kbd_init_pcxt  db "Pc/Xt ",0
kbd_init_at    db "At ",0
not_detected   db "Not detected",0Dh,0
memory_init    db " Memory...",0;
OK_0d          db "OK",0Dh,0
hd_init_1      db " Hard drive",0Dh,0;
hd_init_2      db "  Unit "
hd_init_num    db "0: ",0
mb_string      db " mb",0Dh,0
hex_table db "0123456789abcdef"
screen_name_color db 0FFh,user_color

IFDEF debug
screen_name db "debug",0,"  ",0
ELSE
screen_name db "User",0,"   ",0
ENDIF

;PizziOS :  Welcome to PizziOS.
;           Visit http://pizzi.cjb.net/ for support, feedback and source code.
screen_name2 db 0FFh,user_color,": ",0
os_sn db 0FFh,kernel_color,os_name,": ",0
welcome_message db 0FFh,07h,"Welcome to ",OS_Name,".",0FFh,0FFh,01
 db 01,"Visit http://pizzi.cjb.net/ for support, feedback and source code.",0
blue_death db 0FFh,04Fh,"The Red Screen of Death",0
cpu_fault_msg2 db "This time you ",0
cpu_fault_msg3 db "Error occurred at ",0
cpu_fault_msg4 db "Error code ",0
cpu_fault_msg5 db "Code Dump:",0
fault_0_msg db "DIV'ed",0
fault_1_msg db "got a debug exception (?)",0
fault_2_msg db "got an NMI",0
fault_3_msg db "broke (int3)",0
fault_4_msg db "INTO'ed",0
fault_5_msg db "bounded",0
fault_6_msg db "used an invalid opcode",0
fault_7_msg db "got a no-CP error",0
fault_8_msg db "double faulted",0
fault_9_msg db "got a CP-seg error (386-)",0
fault_A_msg db "used an invalid TSS",0
fault_B_msg db "used a not-present segment",0
fault_C_msg db "stacked",0
fault_D_msg db "GPF'ed",0
fault_E_msg db "page faulted",0
fault_F_msg db "???ed",0
fault_10_msg db "caused a CP error",0
fault_dead_end_msg db "hit a dead end",0
kbi_alpha_table db "qwertyuiopasdfghjklzxcvbnm"
kbi_ascii_table db "1234567890-=[];'`\,."
kbi_ascii_sh_table db "!@#$%^&*()_+{}:", '"', "~|<>"
kbi_keypad_table db "7894561230."
kbi_keypad_sh_table db 13h,17h,15h,19h,0,1Ah,14h,18h,16h,11h,12h

command_root db "root",0
command_sn db "name",0
command_cls db "cls",0
command_reboot db "reboot",0
command_err db "error",0
command_del db "delay",0
command_cd db "cd",0
command_dir db "dir",0
command_help1 db "?",0
command_help2 db "help",0
prompt_help_msg db 0FFh,0Fh,os_name," ", os_vers, " Prompt Commands:",01,01
                db 0FFh,0Ah,"   help    ",0FFh,0FFh,"- Displays this help screen",01,01
                db 0FFh,0Ah,"   root    ",0FFh,0FFh,"- Returns to root directory",01,01
                db 0FFh,0Ah,"   dir     ",0FFh,0FFh,"- Displays directory listing",01,01
                db 0FFh,0Ah,"   cd      ",0FFh,0FFh,"- Change current directory",01,01
                db 0FFh,0Ah,"   cls     ",0FFh,0FFh,"- Clears the screen",01,01
                db 0FFh,0Ah,"   reboot  ",0FFh,0FFh,"- Reboots the system",01,01
                db 0FFh,0Ah,"   error   ",0FFh,0FFh,"- Invokes an intentional error",01,01
                db 0FFh,0Ah,"   delay   ",0FFh,0FFh,"- Causes a delay (typeahead test)",01,01
                db 0FFh,0Ah,"   name    ",0FFh,0FFh,"- Change screen name"
ifdef bscmd
                db 01,01,0FFh,0Ah,"   1,2,3   ",0FFh,0FFh,"- Build-specific commands"
endif
                db 0
;  AUTOEXEC BAT
;->WINDOWS
;  CONFIG   SYS

pre_dir_str db "->",0
pre_file_str db "  ",0
file_str db "01234567",0
file_str_ext_p db " "
file_str_ext db "123",0
cd_nonesuch db "no such animal",0dh,0dh,0
tmp_dir_str db "directory listing of ",0
tmp_dir_root db "root directory listing",0dh,0dh,0
tmp_dir_hd db "  hd00",0dh,0
tmp_dir_none db "no recognized partitions",0dh,0
prompt_sn_msg   db "usage: name new_name",0dh,0dh,0
gameover db "Game Over:",0
zelda_gameover db "The Return Of Gannon",0
ifdef bscmd
bscmdmsg1 db " A vision of a child returning",0Dh
          db " A kingdom where the sky is burning",0Dh
          db " ...I will be there",0Dh
          db 01,23," ","- Steely Dan",0Dh,0Dh,0Dh,0
bscmdmsg2 db " I come to help you with your problems so we can be free",0Dh
          db " I'm not a hero, I'm not a savior, forget what you know",0Dh
          db " I'm just a man who's circumstances went beyond his control",0Dh,0Dh
          db 01,50," ","- Styx",0Dh,0Dh,0Dh,0
bscmdmsg3 db " And the tree was happy...",0
bscmdmsg32 db " but not really.",0
bscmdmsg33 db 0Dh,0Dh,01,23," ","- Shel Silverstein",0Dh,0Dh,0Dh,0
endif

align 32
os_rdata_sz equ $

; BSS

hd_buffer db 512 dup (?)
prompt_hdbuffer db 512 dup (?)
string_buffer db 256 dup (?)
stringin_buffer db 256 dup (?)
partition_tbl db 32*32 dup (?)
;  0 file_system_type db ? ; 1 = FAT16, 2 = FAT32
;  1 host_unit db ?
;  2 spc0 db ? ; sectors per cluster
;  3 spc1 db ? ; log2 (spc0)
;  4 num_fat db ?
;  8 partition_start dd ? ; first sector
; 12 partition_size dd ? ; 0-based. value is highest accessible sector
; 16 root_sectors dd ?
; 20 spfat dd ? ; sectors per fat
; 24 fatsct dd ? ; first fat is here.
; 28 magic_num dd ? ; first cluster is here (root directory)
kbd_buffer db 96 dup (?)

hd_dsc db 8*32 dup (?)
; 0 hd_type db ? ; 0 = not present, 1 = ATA HD, ..., -1 = Unknown
; 1 hd_irq  db ? ; 0 (14), 1 (15), 2 (10), 3 (11)
; 2 hd_flags db ? ; |1|LBA|1|DRV|:|0|0|0|0|
; 3 busy db ?
; 4 cyllendars dw ? ; 0-based (0 means 1 cyl)
; 6 heads dw ?      ; 1-based (1 means 1 head)
; 8 sectors dw ?    ; 1-based
;10 hd_base dw ? ; 1F0, 170, 1E8, 168
;12 hd_capacity dd ? ; number of sectors: 0-based
;16 hd_mults dw ?
;18 hd_canuse db ? ; |?|?|?|?|:|PWR|DMA|LBA|CHS|
;19 max_mult db ?
;20 curr_cyllendars dw ?
;22 curr_heads dw ?
;24 curr_sectors dw ?
;26 curr_mult dw ?
;28 max_dma db ?
;29 max_pio db ?
;30 curr_xfer db ?
;31 db ?
;32

; align 4
fat16_filename dd ?,?,?
;hd_intprocs dd 4 dup (?)
;hd_intparams dd 4 dup (?) ; hold hd_dsc values for int's.
; ; hd_intparams must be right after hd_intprocs
current_partition dd ?
current_directory dd ?
bscmd_var dd ?;0
hd_units dd ?
kbd_last dw ?
kbd_head db ?
kbd_tail db ?
    ;note: put to head, take from tail
kbd_flags dw ?
kbd_buflen db ?
kbd_e0_flag db ?

; allign whatever
current_directory_str db 512 dup (?)
hd_initintflag db ?
zeros db 8 dup (?)
hex_string db 3 dup (?)
numstring db 11 dup (?)
hd_i0 db ?
hd_i1 db ?
hd_i2 db ?
hd_i3 db ?
num_partitions db ?

;db 5000 dup (?)

os_udata_sz equ ($ - os_rdata_sz)


Download this file.


[ Return to Browse Source Page ]
Copyright 2000, Ed Pizzi