⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kernel.asm

📁 GNU FreeDOS兼容MS DOS很好的东东.
💻 ASM
📖 第 1 页 / 共 3 页
字号:
		global	_firstbuf_firstbuf       dd      0               ; 0047 disk buffer chain                dw      0               ; 004B Number of dirty buffers                dd      0               ; 004D pre-read buffer                dw      0               ; 0051 number of look-ahead buffers		global	_bufloc_bufloc         db      0               ; 0053 00=conv 01=HMA		global	_deblock_buf_deblock_buf    dd      0               ; 0054 deblock buffer                times 3 db 0            ; 0058 unknown                dw      0               ; 005B unknown                db      0, 0FFh, 0      ; 005D unknown                global _VgaSet_VgaSet         db      0               ; 0060 unknown                dw      0               ; 0061 unknown                global  _uppermem_link_uppermem_link  db      0               ; 0063 upper memory link flag_min_pars       dw      0               ; 0064 minimum paragraphs of memory 					;      required by program being EXECed                global  _uppermem_root_uppermem_root	dw	0ffffh		; 0066 dmd_upper_root (usually 9fff)_last_para      dw      0               ; 0068 para of last mem searchSysVarEnd:;; FreeDOS specific entries		global	_os_setver_minor_os_setver_minor	db	0		global	_os_setver_major_os_setver_major	db	5		global	_os_minor_os_minor	db	0		global	_os_major	       _os_major	db	5		global	_rev_number_rev_number	db	0		global	_version_flags	       _version_flags	db	0		global	_f_nodes_f_nodes	dd	0		global	_f_nodes_cnt_f_nodes_cnt	dw	0		global	os_release		extern	_os_releaseos_release	dw	_os_release;;  The first 5 sft entries appear to have to be at DS:00cc                times (0cch - ($ - DATASTART)) db 0                global _firstsftt_firstsftt:                             dd -1                   ; link to next                dw 5                    ; count         ; Some references seem to indicate that this data should start at 01fbh in; order to maintain 100% MS-DOS compatibility.                times (01fbh - ($ - DATASTART)) db 0                global  MARK01FBHMARK01FBH       equ     $                global  _local_buffer   ; local_buffer is 256 bytes long                                        ; so it overflows into kb_buf!!        ; only when kb_buf is used, local_buffer is limited to 128 bytes._local_buffer:  times 128 db 0                global  _kb_buf_kb_buf db      128,0                   ; initialise buffer to empty                times 128+1 db 0   ; room for 128 byte readline + LF;; Variables that follow are documented as part of the DOS 4.0-6.X swappable; data area in Ralf Browns Interrupt List #56;; this byte is used for ^P support                global  _PrinterEcho_PrinterEcho    db      0               ;-34 -  0 = no printer echo, ~0 echo                global  _verify_ena_verify_ena     db      0               ; ~0, write with verify; this byte is used for TAB's                global _scr_pos_scr_pos        db      0               ; Current Cursor Column                global  _switchar_switchar       db      '/'             ;-31 - switch char                global  _mem_access_mode_mem_access_mode db     0               ;-30 -  memory allocation strategy                global  sharing_flagsharing_flag    db      0               ; 00 = sharing module not loaded                                        ; 01 = sharing module loaded, but                                        ;      open/close for block devices                                        ;      disabled                                        ; FF = sharing module loaded,                                        ;      open/close for block devices                                        ;      enabled (not implemented)                global  _net_set_count_net_set_count   db      1               ;-28 -  count the name below was set                global  _net_name_net_name       db      '               ' ;-27 - 15 Character Network Name                db      00                ; Terminating 0 byte;;       Variables contained the the "STATE_DATA" segment contain;       information about the STATE of the current DOS Process. These;       variables must be preserved regardless of the state of the INDOS;       flag.;;       All variables that appear in "STATE_DATA" **MUST** be declared;       in this file as the offsets from the INTERNAL_DATA variable are;       critical to the DOS applications that modify this data area.;;                global  _ErrorMode, _InDOS                global  _CritErrLocus, _CritErrCode                global  _CritErrAction, _CritErrClass                global  _CritErrDev, _CritErrDrive                global  _dta                global  _cu_psp, _default_drive                global  _break_ena                global  _return_code                global  _internal_data                global  _CritPatch_CritPatch      dw      0d0ch           ;-11 zero list of patched critical                dw      0d0ch           ;    section variables                dw      0d0ch                dw      0d0ch                dw      0d0ch                db      0               ;-01 - unknown_internal_data:              ; <-- Address returned by INT21/5D06_ErrorMode      db      0               ; 00 - Critical Error Flag_InDOS          db      0               ; 01 - Indos Flag_CritErrDrive   db      0               ; 02 - Drive on write protect error_CritErrLocus   db      0               ; 03 - Error Locus_CritErrCode    dw      0               ; 04 - DOS format error Code_CritErrAction  db      0               ; 06 - Error Action Code_CritErrClass   db      0               ; 07 - Error Class_CritErrDev     dd      0               ; 08 - Failing Device Address_dta            dd      0               ; 0C - current DTA_cu_psp         dw      0               ; 10 - Current PSPbreak_sp        dw      0               ; 12 - used in int 23_return_code    dw      0               ; 14 - return code from process_default_drive  db      0               ; 16 - Current Drive_break_ena      db      1               ; 17 - Break Flag (default TRUE)                db      0               ; 18 - flag, code page switching                db      0               ; 19 - flag, copy of 18 on int 24h abort                global  _swap_always, _swap_indos_swap_always:                global  _Int21AX_Int21AX        dw      0               ; 1A - AX from last Int 21                global  owning_psp, _MachineIdowning_psp      dw      0               ; 1C - owning psp_MachineId      dw      0               ; 1E - remote machine ID                dw      0               ; 20 - First usable mcb                dw      0               ; 22 - Best usable mcb                dw      0               ; 24 - Last usable mcb                dw      0               ; 26 - memory size in paragraphs                dw      0               ; 28 - unknown                db      0               ; 2A - unknown                db      0               ; 2B - unknown                db      0               ; 2C - unknown                global  _break_flg_break_flg      db      0               ; 2D - Program aborted by ^C                db      0               ; 2E - unknown                db      0               ; 2F - not referenced                global  _DayOfMonth_DayOfMonth     db      1               ; 30 - day of month                global  _Month_Month          db      1               ; 31 - month                global  _YearsSince1980_YearsSince1980 dw      0               ; 32 - year since 1980daysSince1980   dw      0FFFFh          ; 34 - number of days since epoch                                        ; force rebuild on first clock read                global  _DayOfWeek_DayOfWeek      db      2               ; 36 - day of week_console_swap   db      0               ; 37 console swapped during read from dev                global  _dosidle_flag        _dosidle_flag   db      1               ; 38 - safe to call int28 if nonzero_abort_progress db      0               ; 39 - abort in progress                global  _CharReqHdr_CharReqHdr:                global  _ClkReqHdr_ClkReqHdr      times 30 db 0      ; 3A - Device driver request header                dd      0               ; 58 - pointer to driver entry                global  _MediaReqHdr_MediaReqHdr    times 22 db 0      ; 5C - Device driver request header                global  _IoReqHdr_IoReqHdr       times 30 db 0      ; 72 - Device driver request header                times 6 db 0       ; 90 - unknown                global  _ClkRecord_ClkRecord      times 6 db 0       ; 96 - CLOCK$ transfer record                dw      0               ; 9C - unknown                global  __PriPathBuffer__PriPathBuffer times 80h db 0     ; 9E - buffer for file name                global  __SecPathBuffer__SecPathBuffer times 80h db 0     ;11E - buffer for file name                global  _sda_tmp_dm_sda_tmp_dm     times 21 db 0      ;19E - 21 byte srch state                global  _SearchDir_SearchDir      times 32 db 0      ;1B3 - 32 byte dir entry                global  _TempCDS_TempCDS        times 88 db 0      ;1D3 - TemporaryCDS buffer                global  _DirEntBuffer_DirEntBuffer   times 32 db 0      ;22B - space enough for 1 dir entry                global  _wAttr_wAttr          dw      0               ;24B - extended FCB file attribute                global  _SAttr_SAttr          db      0           ;24D - Attribute Mask for Dir Search                global  _OpenMode_OpenMode       db      0           ;24E - File Open Attribute                times 3 db 0                global  _Server_Call_Server_Call    db      0           ;252 - Server call Func 5D sub 0                db      0                ; Pad to 05CCh                times (25ch - ($ - _internal_data)) db 0                global  _tsr            ; used by break and critical error_tsr            db      0               ;25C -  handlers during termination                db      0               ;25D - padding                global  term_pspterm_psp        dw  0                   ;25E - 0??                global  int24_esbpint24_esbp      times 2 dw 0       ;260 - pointer to criticalerr DPB                global  _user_r, int21regs_off, int21regs_seg_user_r:int21regs_off   dw      0               ;264 - pointer to int21h stack frameint21regs_seg   dw      0                global  critical_spcritical_sp     dw      0               ;268 - critical error internal stack                global  current_ddsccurrent_ddsc    times 2 dw 0                ; Pad to 059ah                times (27ah - ($ - _internal_data)) db 0                global  current_devicecurrent_device  times 2 dw 0       ;27A - 0??                global  _lpCurSft_lpCurSft       times 2 dw 0       ;27e - Current SFT                global  _current_ldt_current_ldt     times 2 dw 0       ;282 - Current CDS                global  _sda_lpFcb_sda_lpFcb      times 2 dw 0       ;286 - pointer to callers FCB                global  _current_sft_idx_current_sft_idx    dw      0               ;28A - SFT index for next open                                        ; used by MS NET		; Pad to 05b2h                times (292h - ($ - _internal_data)) db 0                dw      __PriPathBuffer  ; 292 - "sda_WFP_START" offset in DOS DS of first filename argument                dw      __SecPathBuffer  ; 294 - "sda_REN_WFP" offset in DOS DS of second filename argument                ; Pad to 05ceh                times (2aeh - ($ - _internal_data)) db 0                global  _current_filepos_current_filepos times 2 dw 0       ;2AE - current offset in file                ; Pad to 05f0h                times (2d0h - ($ - _internal_data)) db 0                global  _prev_user_r                global  prev_int21regs_off                global  prev_int21regs_seg_prev_user_r:prev_int21regs_off      dw      0       ;2D0 - pointer to prev int 21 frameprev_int21regs_seg      dw      0                ; Pad to 05fdh                times (2ddh - ($ - _internal_data)) db 0                global  _ext_open_action                global  _ext_open_attrib                global  _ext_open_mode_ext_open_action dw 0                   ;2DD - extended open action_ext_open_attrib dw 0                   ;2DF - extended open attrib_ext_open_mode   dw 0                   ;2E1 - extended open mode                ; Pad to 0620h                times (300h - ($ - _internal_data)) db 0                global _szNames_szNames:               ;;              times 11 db 0                global  _FcbSearchBuffer        ; during FCB search 1st/next use bottom_FcbSearchBuffer:              ;  of error stack as scratch buffer;               times 43 db 0              ;  - only used during int 21 call                ; stacks are made to initialize to no-ops so that high-water                ; testing can be performed                                global apistk_bottomapistk_bottom:                times STACK_SIZE dw 0x9090 ;300 - Error Processing Stack                global  _error_tos_error_tos:                times STACK_SIZE dw 0x9090 ;480 - Disk Function Stack                global  _disk_api_tos_disk_api_tos:                times STACK_SIZE dw 0x9090 ;600 - Char Function Stack                global  _char_api_tos_char_api_tos:apistk_top:                db      0               ; 780 ???_VolChange      db      0               ;781 - volume change_VirtOpen       db      0               ;782 - virtual open flag                ; controlled variables end at offset 78Ch so pad to end                times (78ch - ($ - _internal_data)) db 0;; end of controlled variables;segment	_BSS;!!                global  _NumFloppies;!!_NumFloppies	resw	1;!!intr_dos_stk	resw	1;!!intr_dos_seg	resw	1; mark front and end of bss area to clearsegment IB_B    global __ib_start__ib_start:segment IB_E    global __ib_end__ib_end:        ;; do not clear the other init BSS variables + STACK: too late.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -