     1                                  
     2                                  ; Public Domain
     3                                  
     4                                  %include "lmacros1.mac"
     1                              <1> [list -]
     5                                  %include "versiona.mac"
     1                              <1> 
     2                              <1> major_version	    equ     4	    ;Major DOS version
     3                              <1> minor_version	    equ     00	    ;Minor DOS Version
     4                              <1> 
     5                              <1> MINOR_VERSION equ minor_version	; NASM port equate
     6                              <1> MAJOR_VERSION equ major_version	; NASM port equate
     7                              <1> expected_version    equ     (MINOR_VERSION << 8)+MAJOR_VERSION
     8                              <1> 
     9                              <1> alt_major_version    equ     5	    ;Major DOS version
    10                              <1> alt_minor_version    equ     26	    ;Minor DOS Version
    11                              <1> 
    12                              <1> alt_expected_version    equ     (alt_minor_version << 8) + alt_major_version
    13                              <1> 
    14                              <1> new_major_version    equ     5	    ;Major DOS version
    15                              <1> new_minor_version    equ     38	    ;Minor DOS Version
    16                              <1> new_expected_version    equ     (new_minor_version << 8) + new_major_version
    17                              <1> 
    18                              <1>        %warning out: ... for DOS Version 4.00 ...
    18          ******************  <1>  warning: out: ... for DOS Version 4.00 ... [-w+user]
    19                              <1> 
    20                              <1>        ;******************************
    21                              <1>        ;Each assembler program should:
    22                              <1>        ;  mov ah,030h			;DOS Get Version function
    23                              <1>        ;  int 021h			;Version ret. in AX,minor version first
    24                              <1>        ;  cmp ax,expected_version	;ALL utilities should check for an
    25                              <1>        ;  jne error_handler		; EXACT version match.
    26                              <1>        ;******************************
    27                              <1> 
     6                                  %include "buf2sw.mac"
     1                              <1> %define BUF2 1
     7                                  %include "entrysw.mac"
     1                              <1> 
     2                              <1> %ifndef __ENTRYSW_MAC__
     3                              <1>  %assign __ENTRYSW_MAC__ 1
     4                              <1> 
     5                              <1> %assign _DOSCODEHMA		1
     6                              <1> %assign _RELOCATEDOSCODE	1
     7                              <1> 
     8                              <1> 		; Write a label "%1" (only if DOSCODE isn't relocated) and
     9                              <1> 		; "relocated%1" (always).
    10                              <1> 	%imacro relocated 1-2.nolist
    11                              <1> %ifnidni %2, device
    12                              <1>  %ifnidni %2, amis
    13                              <1>   %ifn _RELOCATEDOSCODE
    14                              <1> %1:
    15                              <1> 	global %1
    16                              <1>   %endif
    17                              <1>  %endif
    18                              <1> %endif
    19                              <1> relocated%1:				; always used for local labels
    20                              <1> 	global relocated%1
    21                              <1> 	%endmacro
    22                              <1> 
    23                              <1> %if _RELOCATEDOSCODE
    24                              <1> DOSENTRYADJUSTSEGMENT equ 60h - 26h
    25                              <1> %else
    26                              <1> DOSENTRYADJUSTSEGMENT equ 0
    27                              <1> %endif
    28                              <1> DOSENTRYADJUSTOFFSET equ DOSENTRYADJUSTSEGMENT * 16
    29                              <1> 
    30                              <1> DOSENTRYDEVICEBASE equ 10h
    31                              <1> 
    32                              <1> %endif
     8                                  %include "memsw.mac"
     1                              <1> %define LDOSMEM 1
     9                                  
    10                                  version:
    11 00000000 20                      	db 32
    12                                  %include "version.inc"
     1 00000001 6C444F532028323032- <1> 	db "lDOS (2026 May) based on MS-DOS v4.01"
     1 0000000A 36204D617929206261- <1>
     1 00000013 736564206F6E204D53- <1>
     1 0000001C 2D444F532076342E30- <1>
     1 00000025 31                  <1>
    13 00000026 20<rep 20h>             	_fill_at_least 70, 32, version
    14 00000046 0D0A                    	db 13,10
    15                                  
    16                                  revisionid:
    17                                  %ifdef _REVISIONID
    18 00000048 5265766973696F6E20-     	db "Revision ID: ",_REVISIONID
    18 00000051 49443A206867203834-
    18 0000005A 366364643064633764-
    18 00000063 332028313739342061-
    18 0000006C 6E636573746F727329-
    18 00000075 2C206272616E636820-
    18 0000007E 64656661756C74     
    19                                  %endif
    20 00000085 20<rep 9h>              	_fill_at_least 70, 32, revisionid
    21 0000008E 0D0A                    	db 13,10
    22                                  
    23                                  versiona:
    24                                  %assign MAJOR new_major_version
    25                                  %assign MINOR new_minor_version
    26                                  	verdef DOS,, MAJOR, MINOR
    27 00000090 5265706F7274656420-     	db "Reported DOS version: ",DOS_VER_STR
    27 00000099 444F53207665727369-
    27 000000A2 6F6E3A20352E3338   
    28 000000AA 20<rep 2Ch>             	_fill_at_least 70, 32, versiona
    29 000000D6 0D0A                    	db 13,10
    30                                  
    31                                  %ifdef BUF2
    32 000000D8 42554632206F707469-     	db "BUF2 option enabled ",13,10
    32 000000E1 6F6E20656E61626C65-
    32 000000EA 64200D0A           
    33                                  %else
    34                                  	db "BUF2 option disabled",13,10
    35                                  %endif
    36                                  %ifdef LDOSMEM
    37 000000EE 4C444F534D454D206F-     	db "LDOSMEM option enabled ",13,10
    37 000000F7 7074696F6E20656E61-
    37 00000100 626C6564200D0A     
    38                                  %else
    39                                  	db "LDOSMEM option disabled",13,10
    40                                  %endif
    41                                  %if _RELOCATEDOSCODE
    42 00000107 5F52454C4F43415445-     	db "_RELOCATEDOSCODE option enabled ",13,10
    42 00000110 444F53434F4445206F-
    42 00000119 7074696F6E20656E61-
    42 00000122 626C6564200D0A     
    43                                   %if _DOSCODEHMA
    44 00000129 5F444F53434F444548-     	db "_DOSCODEHMA option enabled ",13,10
    44 00000132 4D41206F7074696F6E-
    44 0000013B 20656E61626C656420-
    44 00000144 0D0A               
    45                                   %else
    46                                  	db "_DOSCODEHMA option disabled",13,10
    47                                   %endif
    48                                  %else
    49                                  	db "_RELOCATEDOSCODE option disabled",13,10
    50                                  	db "_DOSCODEHMA option disabled",13,10
    51                                  %endif
    52 00000146 1A                      	db 26
