kernel.lst
来自「DOS SOURCE CODE,DOS-C started in 1988 as」· LST 代码 · 共 1,267 行 · 第 1/4 页
LST
1,267 行
565 0003 00 db (?) ; padding
566 0004 0001 dw 1 ; Hardcoded MS-DOS 4.0+ style
567
568 ; A reference seems to indicate that this should start at offset 26h.
569 0006 20*(??) db (26h - (offset $ - DATASTART)) dup (?)
570 public MARK0026H
571 =_FIXED_DATA:0026 MARK0026H equ $
572
573 ; Globally referenced variables - WARNING: DO NOT CHANGE ORDER
574 ; BECAUSE THEY ARE DOCUMENTED AS UNDOCUMENTED (?) AND HAVE
575 ; MANY MULTIPLEX PROGRAMS AND TSR'S ACCESSING THEM
576 public _NetRetry
577 0026 0003 _NetRetry dw 3 ;-000c network retry count
578 public _NetDelay
579 0028 0001 _NetDelay dw 1 ;-000a network delay count
580 public _DskBuffer
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 15
kernel.ASM
581 002A FFFFFFFF _DskBuffer dd -1 ;-0008 current dos disk buffer
582 002E 0000 dw (?) ;-0004 Unread con input
583 public _first_mcb
584 0030 0000 _first_mcb dw (?) ;-0002 Start of user memory
585 public _DPBp
586 0032 00000000 _DPBp dd (?) ; 0000 First drive Parameter Block
587 public _sfthead
588 0036 00000000 _sfthead dd (?) ; 0004 System File Table head
589 public _clock
590 003A 00000000 _clock dd (?) ; 0008 CLOCK$ device
591 public _syscon
592 003E 00000000 _syscon dd (?) ; 000c console device
593 public _maxbksize
594 0042 0000 _maxbksize dw (?) ; 0010 Number of Drives in system
595 public _firstbuf;
596 0044 00000000 _firstbuf dd (?) ; 0012 head of buffers linked list
597 public _CDSp
598 0048 00000000 _CDSp dd (?) ; 0016 Current Directory Structure
599 public _FCBp
600 004C 00000000 _FCBp dd (?) ; 001a FCB table pointer
601 public _nprotfcb
602 0050 0000 _nprotfcb dw (?) ; 001e number of protected fcbs
603 public _nblkdev
604 0052 00 _nblkdev db (?) ; 0020 number of block devices
605 public _lastdrive
606 0053 00 _lastdrive db (?) ; 0021 value of last drive
607 public _nul_dev
608 0054 _nul_dev label dword ; 0022 device chain root
609 0054 FFFFFFFF dd -1
610 0058 8004 dw 8004h ; attributes = char device, NUL bit set
611 005A 007Dr dw offset _nul_strtgy
612 005C 0086r dw offset _nul_intr
613 005E 4E 55 4C 20 20 20 20+ db 'NUL '
614 20
615 public _njoined
616 0066 00 _njoined db (?) ; 0034 number of joined devices
617 0067 0000 dw 0 ; 0035 DOS 4 pointer to special names (always zero in +
618 DOS 5)
619 0069 0000 0000 setverPtr dw 0,0 ; 0037 setver list
620 006D 0000 dw 0 ; 003B cs offset for fix a20
621 006F 0000 dw 0 ; 003D psp of last umb exec
622 0071 0001 dw 1 ; 003F number of buffers
623 0073 0001 dw 1 ; 0041 size of pre-read buffer
624 public _BootDrive
625 0075 0000 _BootDrive dw (?) ; 0043 drive we booted from
626 0077 00 db 0 ; 0044 cpu type (1 if >=386)
627 0078 0000 dw 0 ; 0045 Extended memory in KBytes
628 007A 00000000 buf_info dd (?) ; 0047 disk buffer chain
629 007E 0000 dw 0 ; 004B 0 (DOS 4 = # hashing chains)
630 0080 00000000 dd (?) ; 004D pre-read buffer
631 0084 0000 dw 0 ; 0051 # of sectors
632 0086 00 db 0 ; 0053 00=conv 01=HMA
633 0087 0000 dw 0 ; 0054 deblock buf in conv
634 0089 0000 deblock_seg dw 0 ; 0056 (offset always zero)
635 008B 03*(??) db 3 dup (?) ; 0058 unknown
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 16
kernel.ASM
636 008E 0000 dw 0 ; 005B unknown
637 0090 00 FF 00 db 0, 0FFh, 0 ; 005D unknown
638 0093 00 db 0 ; 0060 unknown
639 0094 0000 dw 0 ; 0061 unknown
640 0096 00 dmd_upper_link db 0 ; 0063 upper memory link flag
641 0097 0000 dw 0 ; 0064 unknown
642 0099 FFFF dmd_upper_root dw 0FFFFh ; 0066 dmd_upper_root
643 009B 0000 dw 0 ; 0068 para of last mem search
644 009D SysVarEnd label byte
645
646
647 ; Some references seem to indicate that this data should start at 01fbh in
648 ; order to maintain 100% MS-DOS compatibility.
649 009D 015E*(??) db (01fbh - (SysVarEnd - DATASTART)) dup (?)
650
651 public MARK01FBH
652 =_FIXED_DATA:01FB MARK01FBH equ $
653 01FB 80*(??) db 128 dup (?)
654 public _kb_buf
655 027B 81 00 _kb_buf db 129,0 ; initialise buffer to empty
656 027D 81*(??) db 128+1 dup (?) ; room for 128 byte readline + LF
657 ;
658 ; Variables that follow are documented as part of the DOS 4.0-6.X swappable
659 ; data area in Ralf Browns Interrupt List #56
660 ;
661 ; this byte is used for ^P support
662 public _PrinterEcho
663 02FE 00 _PrinterEcho db 0 ;-34 - 0 = no printer echo, ~0 echo
664 public _verify_ena
665 02FF 00 _verify_ena db 0 ; ~0, write with verify
666
667 ; this byte is used for TAB's
668 public _scr_pos
669 0300 00 _scr_pos db 0 ; Current Cursor Column
670 public _switchar
671 0301 2F _switchar db '/' ;-31 - switch char
672 public _mem_access_mode
673 0302 00 _mem_access_mode db 0 ;-30 - memory allocation strategy
674 public sharing_flag
675 0303 00 sharing_flag db 0 ; 00 = sharing module not loaded
676 ; 01 = sharing module loaded, but
677 ; open/close for block devices
678 ; disabled
679 ; FF = sharing module loaded,
680 ; open/close for block devices
681 ; enabled (not implemented)
682 public net_set_count
683 0304 01 net_set_count db 1 ;-28 - count the name below was set
684 public net_name
685 0305 20 20 20 20 20 20 20+ net_name db ' ' ;-27 - 15 Character Network Name
686 20 20 20 20 20 20 20+
687 20
688 0314 00 db 00 ; Terminating 0 byte
689
690
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 17
kernel.ASM
691 ;
692 ; Variables contained the the "STATE_DATA" segment contain
693 ; information about the STATE of the current DOS Process. These
694 ; variables must be preserved regardless of the state of the INDOS
695 ; flag.
696 ;
697 ; All variables that appear in "STATE_DATA" **MUST** be declared
698 ; in this file as the offsets from the INTERNAL_DATA variable are
699 ; critical to the DOS applications that modify this data area.
700 ;
701 ;
702 public _CritErrFlag, _InDOS
703 public _CritErrLocus, _CritErrCode
704 public _CritErrAction, _CritErrClass
705 public _CritErrDev, _CritErrDrive
706 public _dta
707 public _cu_psp, _default_drive
708 public _break_ena
709 public _return_code, _return_mode
710 public _internal_data
711
712 public _CritPatch
713 0315 0D0C _CritPatch dw 0d0ch ;-11 zero list of patched critical
714 0317 0D0C dw 0d0ch ; section variables
715 0319 0D0C dw 0d0ch
716 031B 0D0C dw 0d0ch
717 031D 0D0C dw 0d0ch
718 031F 00 db (?) ;-01 - unknown
719 0320 _internal_data label byte ; <-- Address returned by INT21/5D06
720 0320 00 _CritErrFlag db 0 ; 00 - Critical Error Flag
721 0321 00 _InDOS db 0 ; 01 - Indos Flag
722 0322 00 _CritErrDrive db 0 ; 02 - Drive on write protect error
723 0323 00 _CritErrLocus db 0 ; 03 - Error Locus
724 0324 0000 _CritErrCode dw 0 ; 04 - DOS format error Code
725 0326 00 _CritErrAction db 0 ; 06 - Error Action Code
726 0327 00 _CritErrClass db 0 ; 07 - Error Class
727 0328 00000000 _CritErrDev dd (?) ; 08 - Failing Device Address
728 032C 00000000 _dta dd (?) ; 0C - current DTA
729 0330 0000 _cu_psp dw (?) ; 10 - Current PSP
730 0332 0000 break_sp dw (?) ; 12 - used in int 23
731 0334 00 _return_code db 0 ; 14 - return code from process
732 0335 00 _return_mode db 0 ; 15 - reason for process terminate
733 0336 00 _default_drive db 0 ; 16 - Current Drive
734 0337 00 _break_ena db 0 ; 17 - Break Flag
735 0338 0000 dw 0 ; 18 - unknown
736
737 public _swap_always, _swap_indos
738 033A _swap_always label byte
739
740 public _Int21AX
741 033A 0000 _Int21AX dw 0 ; 1A - AX from last Int 21
742
743 public owning_psp, machine_id
744 033C 0000 owning_psp dw 0 ; 1C - owning psp
745 033E 0000 machine_id dw 0 ; 1E - remote machine ID
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 18
kernel.ASM
746 0340 0000 dw 0 ; 20 - First usable mcb
747 0342 0000 dw 0 ; 22 - Best usable mcb
748 0344 0000 dw 0 ; 24 - Last usable mcb
749 0346 0000 dw 0 ; 26 - memory size in paragraphs
750 0348 0000 dw 0 ; 28 - unknown
751 034A 00 db 0 ; 2A - unknown
752 034B 00 db 0 ; 2B - unknown
753 034C 00 db 0 ; 2C - unknown
754 public _break_flg
755 034D 00 _break_flg db 0 ; 2D - Program aborted by ^C
756 034E 00 db 0 ; 2E - unknown
757 034F 00 db 0 ; 2F - not referenced
758 public _DayOfMonth
759 0350 01 _DayOfMonth db 1 ; 30 - day of month
760 public _Month
761 0351 01 _Month db 1 ; 31 - month
762 public _YearsSince1980
763 0352 0000 _YearsSince1980 dw 0 ; 32 - year since 1980
764 0354 FFFF daysSince1980 dw 0FFFFh ; 34 - number of days since epoch
765 ; force rebuild on first clock read
766 public _DayOfWeek
767 0356 02 _DayOfWeek db 2 ; 36 - day of week
768 public _Year
769 0357 07BC _Year dw 1980 ; 37 - year
770 0359 00 db 0 ; 39 - unknown
771 public _CharReqHdr
772 035A _CharReqHdr label byte
773 public _ClkReqHdr
774 035A 1E*(??) _ClkReqHdr db 30 dup (?) ; 3A - Device driver request header
775 0378 00000000 dd 0 ; 58 - pointer to driver entry
776 public _MediaReqHdr
777 037C 16*(??) _MediaReqHdr db 22 dup (?) ; 5C - Device driver request header
778 public _IoReqHdr
779 0392 1E*(??) _IoReqHdr db 30 dup (?) ; 72 - Device driver request header
780 03B0 06*(??) db 6 dup (?) ; 90 - unknown
781 public _ClkRecord
782 03B6 06*(??) _ClkRecord db 6 dup (?) ; 96 - CLOCK$ transfer record
783 03BC 0000 dw (?) ; 9C - unknown
784 public __PriPathBuffer
785 03BE 80*(??) __PriPathBuffer db 80h dup (?) ; 9E - buffer for file name
786 public __SecPathBuffer
787 043E 80*(??) __SecPathBuffer db 80h dup (?) ;11E - buffer for file name
788 public _TempBuffer
789 04BE 15*(??) _TempBuffer db 21 dup (?) ;19E - 21 byte srch state
790 public _SearchDir
791 04D3 20*(??) _SearchDir db 32 dup (?) ;1B3 - 32 byte dir entry
792 public _TempCDS
793 04F3 58*(??) _TempCDS db 88 dup (?) ;1D3 - TemporaryCDS buffer
794 public _DirEntBuffer
795 054B 20*(??) _DirEntBuffer db 32 dup (?) ;22B - space enough for 1 dir entry
796 public _wAttr
797 056B 0000 _wAttr dw 0 ;24B - extended FCB file attribute
798
799
800 ; Pad to 057Ch
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 19
kernel.ASM
801 056D 0F*(??) db (25ch - (offset $ - _internal_data)) dup (?)
802
803 public _tsr ; used by break and critical error
804 057C 00 _tsr db 0 ;25C - handlers during termination
805 057D 00 db (?) ;25D - padding
806 public term_psp
807 057E 0000 term_psp dw 0 ;25E - ???
808 public int24_esbp
809 0580 02*(????) int24_esbp dw 2 dup (?) ;260 - pointer to criticalerr DPB
810 public _user_r, int21regs_off, int21regs_seg
811 0584 _user_r label dword
812 0584 0000 int21regs_off dw 0 ;264 - pointer to int21h stack frame
813 0586 0000 int21regs_seg dw 0
814 public critical_sp
815 0588 0000 critical_sp dw 0 ;268 - critical error internal stack
816 public current_ddsc
817 058A 02*(????) current_ddsc dw 2 dup (?)
818
819 ; Pad to 059ah
820 058E 0C*(??) db (27ah - (offset $ - _internal_data)) dup (?)
821 public current_device
822 059A 02*(????) current_device dw 2 dup (?) ;27A - ???
823 public _lpCurSft
824 059E 02*(????) _lpCurSft dw 2 dup (?) ;27e - Current SFT
825 public current_ldt
826 05A2 02*(????) current_ldt dw 2 dup (?) ;282 - Current CDS
827 public _lpFcb
828 05A6 02*(????) _lpFcb dw 2 dup (?) ;286 - pointer to callers FCB
829 public current_ifn
830 05AA 0000 current_ifn dw 0 ;28A - SFT index for next open
831
832 ; Pad to 05ceh
833 05AC 22*(??) db (2aeh - (offset $ - _internal_data)) dup (?)
834 public current_filepos
835 05CE 02*(????) current_filepos dw 2 dup (?) ;2AE - current offset in file
836
837 ; Pad to 05f0h
838 05D2 1E*(??) db (2d0h - (offset $ - _internal_data)) dup (?)
839 public _prev_user_r
840 public prev_int21regs_off
841 public prev_int21regs_seg
842 05F0 _prev_user_r label dword
843 05F0 0000 prev_int21regs_off dw 0 ;2D0 - pointer to prev int 21 frame
844 05F2 0000 prev_int21regs_seg dw 0
845
846 ; Pad to 0620h
847 05F4 2C*(??) db (300h - (offset $ - _internal_data)) dup (?)
848
849 public _FcbSearchBuffer ; during FCB search 1st/next use bottom
850 0620 _FcbSearchBuffer label byte ; of error stack as scratch buffer
851 ; db 43 dup (?) ; - only used during int 21 call
852 public _LocalPath
853 0620 _LocalPath label byte
854 ; db 67 dup (?)
855 ; stacks are made to initialize to no-ops so that high-water
Turbo Assembler Version 3.1 04/11/13 12:54:48 Page 20
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?