Category : Utilities for DOS and Windows Machines
Archive   : SN.ZIP
Filename : _SN.LST
_SN.ASM
1 %ctls
2 %bin 21
3 %conds
4 %crefall
5 %depth 1
6 %incl
7 %linum 5
8 %list
9 masm
10 multerrs
11 noemul
12 nojumps
13 nolocals
14 %nomacs
15 nomasm51
16 %notrunc
17 p8086
18 %pagesize 74, 112
19 %pcnt 4
20 radix 10
21 .seq
22 smart
23 %syms
24 %tabsize 8
25 %text 70
26 warn
27
28 ;---------------------------------------------------------------------
29 ;
30 ; _SN.ASM
31 ;
32 ; Version 1.00
33 ;
34 ; Two functions used by _SN.C:
35 ;
36 ; READ_BOOT_SECTOR - reads boot sector from disk
37 ; WRITE_BOOT_SECTOR - writes boot sector to disk
38 ;
39 ; Steve Grant
40 ; Jersey City, NJ
41 ; September 5, 1991
42 ;
43 ;---------------------------------------------------------------------
44
45 public _read_boot_sector
46 public _write_boot_sector
47
48 ;---------------------------------------------------------------------
49
50 0000 .model small
51
52 0000 .code
53
54 ;---------------------------------------------------------------------
55
56 0000 _read_boot_sector proc
57
58 ; On entry:
59 ;
60 ; BP
61 ; SP => near return address
62 ; drive number (0=A, 1=B, etc.)
63 ; offset of disk buffer
64 ;
65 ; On exit:
66 ;
67 ; AX = function result
68 ; 0000 - function successful
69 ; other - error result as returned by INT 25H
Turbo Assembler Version 2.0 09/05/91 20:00:00 Page 2
_SN.ASM
70 ; buffer = filled in with data from disk boot sector
71
72 ARG drive : byte : 2, \
73 buffer : ptr
74
75 0000 55 push bp
76 0001 8B EC mov bp, sp
77
78 0003 8A 46 04 mov al, drive
79 0006 33 D2 xor dx, dx
80 0008 B9 0001 mov cx, 1
81 000B 8B 5E 06 mov bx, buffer
82 000E 55 push bp
83 000F 57 push di
84 0010 56 push si
85 0011 CD 25 int 25H
86 0013 44 inc sp ; fix broken stack
87 0014 44 inc sp
88 0015 5E pop si
89 0016 5F pop di
90 0017 5D pop bp
91 0018 72 02 jc _r_1
92
93 001A 33 C0 xor ax, ax
94
95 001C _r_1:
96 001C 8B E5 mov sp, bp
97 001E 5D pop bp
98 001F C3 ret
99
100 0020 _read_boot_sector endp
101
102 ;---------------------------------------------------------------------
103
104 0020 _write_boot_sector proc near
105
106 ; On entry:
107 ;
108 ; BP
109 ; SP => near return address
110 ; drive number (0=A, 1=B, etc.)
111 ; offset of disk buffer
112 ;
113 ; On exit:
114 ;
115 ; AX = function result
116 ; 0000 - function successful
117 ; other - error result as returned by INT 26H
118
119 ARG drive : byte : 2, \
120 buffer : ptr
121
122 0020 55 push bp
123 0021 8B EC mov bp, sp
124
125 0023 8A 46 04 mov al, drive
126 0026 33 D2 xor dx, dx
127 0028 B9 0001 mov cx, 1
128 002B 8B 5E 06 mov bx, buffer
129 002E 55 push bp
130 002F 57 push di
131 0030 56 push si
132 0031 CD 26 int 26H
133 0033 44 inc sp ; fix broken stack
134 0034 44 inc sp
135 0035 5E pop si
136 0036 5F pop di
137 0037 5D pop bp
138 0038 72 02 jc _w_1
Turbo Assembler Version 2.0 09/05/91 20:00:00 Page 3
_SN.ASM
139
140 003A 33 C0 xor ax, ax
141
142 003C _w_1:
143 003C 8B E5 mov sp, bp
144 003E 5D pop bp
145 003F C3 ret
146
147 0040 _write_boot_sector endp
148
149 ;---------------------------------------------------------------------
150
151 end
Turbo Assembler Version 2.0 09/05/91 20:00:00 Page 4
Symbol Table
Symbol Name Type Value Cref (defined at #)
??date Text "09/05/91"
??filename Text "_SN "
??time Text "20:00:00"
??version Number 0200
@CodeSize Text 0 #50
@Cpu Text 0101H #17
@DataSize Text 0 #50
@FileName Text _SN
@Model Text 2 #50
@WordSize Text 2 #17 #52
@code Text _TEXT #50 #50 #52
@curseg Text _TEXT #52
@data Text DGROUP #50
_r_1 Near _TEXT:001C 91 #95
_read_boot_sector Near _TEXT:0000 45 #56
_w_1 Near _TEXT:003C 138 #142
_write_boot_sector Near _TEXT:0020 46 #104
buffer Number [DGROUP:BP+0006] #72 81 #119 128
drive Number [DGROUP:BP+0004] #72 78 #119 125
Groups & Segments Bit Size Align Combine Class Cref (defined at #)
DGROUP Group #50 50
_DATA 16 0000 Word Public DATA #50
_TEXT 16 0040 Word Public CODE #50 50 #52 52
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/