Changeset 30 for trunk/BOOTCODE/REGULAR/OTHER.ASM
- Timestamp:
- May 6, 2011, 4:25:19 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/REGULAR/OTHER.ASM
r29 r30 20 20 ;--------------------------------------------------------------------------- 21 21 22 IFDEF ModuleNames 23 DB 'OTHER',0 24 ENDIF 25 22 26 ; In: DS:SI - Pointer to begin of string 23 27 ; CX - Len of string … … 72 76 dec dh 73 77 jnz GLOSS_StringsLoop 74 movzx cx, dl 78 ;movzx cx, dl 79 mov cl,dl 80 mov ch,0 81 75 82 ret 76 83 GetLenOfStrings EndP … … 87 94 mov VideoIO_Segment, VideoIO_Page0 88 95 96 ; Don't use blinking attribute 97 call VideoIO_NoBlinking 98 99 ; Get HardDriveCount 100 call DriveIO_GetHardDriveCount 101 102 103 ; Rousseau: added 104 call VideoIO_ClearScreen 105 106 ; Cursor to upper-left 107 mov TextPosX, 0 108 mov TextPosY, 0 109 call VideoIO_CursorSet 110 111 ;mov ax, VideoIO_Page1 112 ;call VideoIO_BackUpTo ; Copy BIOS POST to Second Page 113 114 ; Copyright 115 mov si, offset Copyright 116 call MBR_Teletype 117 xor si,si 118 call MBR_TeletypeNL 119 120 121 ;call SOUND_Beep 122 123 ; Build Date 124 mov si, offset BUILD_DATE 125 call MBR_TeletypeNL 126 127 ; Initialize the com-port for debugging 128 call AuxIO_Init 129 130 xor si,si 131 call MBR_TeletypeNL 132 133 xor cx,cx 134 PRECRAP_Main_next_disk: 135 136 mov dl,cl 137 or dl,80h 138 139 call DriveIO_GatherDiskInfo ; Also used to fill the geo, should be separate function 140 141 mov bx,offset HugeDisk 142 add bx,cx 143 mov [bx], al 144 145 call DriveIO_LoadMasterLVMSector ; returns ZF=1 if no valid LVM record found 146 147 pushf 148 mov bx, offset TrueSecs 149 add bx,cx 150 add bx,cx 151 add bx,cx 152 add bx,cx 153 popf 154 155 ; bx now contains pointer to truesecs for this drive 156 157 jz NoValidMasterLVM 158 159 mov si,offset LVMSector 160 mov ax,[si+LocLVM_Secs] 161 mov word ptr [bx],ax 162 jmp SkipUseBiosSecs 163 164 165 NoValidMasterLVM: 166 push bx ; push truesecs pointer 167 mov bx, offset BIOS_Secs 168 add bx,cx 169 add bx,cx 170 add bx,cx 171 add bx,cx 172 173 mov ax,[bx] ; get biossecs 174 pop bx 175 mov word ptr [bx],ax ; store bios secs in truesecs 176 177 178 SkipUseBiosSecs: 179 inc cx 180 cmp cl,[TotalHarddiscs] 181 jb PRECRAP_Main_next_disk 182 183 184 185 IFDEF AuxDebug 186 ; Write some debug-info to the com-port 187 call DEBUG_Dump1 188 ENDIF 189 190 ; jz NoValidMasterLVM 191 192 193 ; A valid Master LVM has been found. 194 ; We use the values in here to determine the number of sectors per track, 195 ; since this could be OS/2 extended geometry. 196 197 ; jmp Continue1 198 199 200 ;mov word ptr [LOG_Secs],63 201 202 mov al,[HugeDisk] ;; fout, moet nog index bij 203 call AuxIO_TeletypeHexByte 204 call AuxIO_TeletypeNL 205 206 mov ax,word ptr [TrueSecs] ;; fout, moet nog index bij 207 call AuxIO_TeletypeHexWord 208 call AuxIO_TeletypeNL 209 210 211 212 ; Huge Disk indicator 213 mov si, offset HugeBootDisk 214 call MBR_Teletype 215 mov al,[HugeDisk] 216 mov si, offset No 217 test al,al 218 jz MBR_HugeDriveIndicator 219 mov si, offset Yes 220 221 MBR_HugeDriveIndicator: 222 call MBR_Teletype 223 xor si,si 224 call MBR_TeletypeNL 225 226 227 228 229 230 ; 231 ; Phase 1 Indicator 232 ; 233 mov si, offset Phase1 234 call MBR_Teletype 235 236 mov si, offset eCS_InstallVolume 237 mov al, [si] 238 test al,al ; See if phase 1 is active 239 jnz MBR_Main_BootThrough 240 mov si, offset NotActive 241 242 MBR_Main_BootThrough: 243 call MBR_TeleType 244 xor si,si 245 call MBR_TeletypeNL ; ALP barks undefined symbol; must use prototypes ? 246 247 89 248 ; Calculate Cooper-Bar Tables 90 249 call FX_CalculateTables … … 108 267 109 268 call PRECRAP_CheckFor13extensions 269 110 270 IFNDEF ReleaseCode 111 271 ret 112 272 ENDIF 273 113 274 call PRECRAP_CheckConfiguration 275 114 276 ; ======================================= 115 277 ; Checks for MBR Virii :) I love that job … … 123 285 call VIRUS_CheckForVirus 124 286 PCM_NoVirusDetection: 287 288 125 289 ; ============================================ 126 290 ; Delay for some time and get Strg/Alt State … … 132 296 jz PCM_LongDelay 133 297 PCM_ShortDelay: 298 134 299 mov al, 13 ; shorten delay,if floppy gets accessed 135 300 PCM_LongDelay: 301 136 302 call TIMER_WaitTicCount 303 137 304 ; First check, if any normal key got pressed... 138 305 mov ah, 1 … … 143 310 call MBR_Teletype 144 311 mov al, 54 ; about 3 seconds, delay again 312 145 313 call TIMER_WaitTicCount 314 146 315 PCM_NoNormalKeyPressed: 147 316 ; Now get keyboard Strg/Alt State … … 156 325 ret 157 326 PRECRAP_Main EndP 327 328 158 329 159 330 AFTERCRAP_Main Proc Near Uses … … 209 380 jmp MBR_HaltSystem 210 381 PRECRAP_CheckConfiguration EndP 382 383 384 ; Rousseau: added 385 ; In: SI - Pointer to begin of string (EOS is 0) 386 ; Destroyed: SI 387 ; Fixme: Uses double writes to use attribute with teletype-function. 388 MBR_TeletypeBold Proc Near Uses ax bx cx 389 MBRT_LoopBold: 390 lodsb 391 or al, al 392 jz MBRT_EndBold 393 push ax 394 mov ah,09h 395 mov bx,15 396 mov cx,1 397 int 10h 398 pop ax 399 mov ah,0eh 400 mov bx,7 ; Does not do anything in text-modus 401 mov cx,1 402 int 10h 403 jmp MBRT_LoopBold 404 MBRT_EndBold: 405 ret 406 MBR_TeletypeBold EndP 407 408 ; In: SI - Pointer to begin of string (EOS is 0) 409 ; Destroyed: SI 410 ; Fixme: Uses double writes to use attribute with teletype-function. 411 MBR_TeletypeVolName Proc Near Uses ax bx cx 412 mov cx, 11 413 MBRT_LoopVolName: 414 mov dx,cx ; Backup counter 415 lodsb 416 or al, al 417 jz MBRT_EndVolName 418 push ax 419 mov ah,09h 420 mov bx,15 421 mov cx,1 422 int 10h ; DX is preserved 423 pop ax 424 mov ah,0eh 425 mov bx,7 ; Does not do anything in text-modus 426 mov cx,1 427 int 10h ; DX is preserved 428 mov cx,dx ; Restore counter 429 loop MBRT_LoopVolName 430 MBRT_EndVolName: 431 ret 432 MBR_TeletypeVolName EndP 433 434 ; Rousseau: added 435 ; Move cursor to next line 436 ; Just do a new-line if SI==0 437 MBR_TeletypeNL Proc Near Uses ax bx cx 438 test si,si 439 jz MBR_TeletypeNL_NL 440 call MBR_Teletype 441 MBR_TeletypeNL_NL: 442 push si 443 mov si, offset NL 444 call MBR_Teletype 445 pop si 446 ret 447 MBR_TeletypeNL EndP 448 449 ; Sync teletype position to VideoIO 450 MBR_TeletypeSyncPos Proc Near Uses ax bx cx dx 451 pushf 452 mov bh, 0 453 mov ah, 02h 454 mov dh,[TextPosY] 455 mov dl,[TextPosX] 456 int 10h 457 popf 458 ret 459 MBR_TeletypeSyncPos EndP
Note:
See TracChangeset
for help on using the changeset viewer.