Changeset 38 for trunk/BOOTCODE/SPECIAL
- Timestamp:
- Apr 11, 2014, 9:36:56 PM (12 years ago)
- Location:
- trunk/BOOTCODE/SPECIAL
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BOOTCODE/SPECIAL/F00K/BILLSUXX.ASM
r37 r38 51 51 jz MSHPPT_NoMShack 52 52 MSHPPT_HarddriveLoop: 53 push ax 54 push bx 55 push cx 56 push dx 53 push ax bx cx dx 57 54 xor ax, ax 58 55 xor bx, bx ; Location Absolute Sector 0 … … 60 57 xor dh, dh ; Location Cylinder 0, Head 0, Sector 1 MBR/PPT 61 58 call DriveIO_LoadPartition 62 pop dx 63 pop cx 64 pop bx 65 pop ax 59 pop dx cx bx ax 66 60 jc MSHPPT_Failure 67 61 -
trunk/BOOTCODE/SPECIAL/FAT16.ASM
r37 r38 103 103 xor di, di 104 104 FAT16SE_SearchLoop: 105 push si 106 push di 105 push si di 107 106 mov cx, 11 108 107 repe cmpsb ; Compare total 11-bytes 109 pop di 110 pop si 108 pop di si 111 109 je FAT16SE_EntryFound 112 110 add di, 32 ; Skip 1 FAT16-Entry now :) … … 223 221 224 222 ; Set Size-Entry in KernelSizeTable 225 push ds 226 push si 227 push di 223 push ds si di 228 224 mov bx, ds:[si+30] 229 225 mov ax, ds:[si+28] ; BX:AX - Size of file in Bytes … … 244 240 mov di, si 245 241 call PART_FillOutSizeElement ; BX:AX -> ES:DI (Size Element) 246 pop di 247 pop si 248 pop ds 242 pop di si ds 249 243 250 244 ; Copy entry and make append extension to basename -
trunk/BOOTCODE/SPECIAL/FX.ASM
r37 r38 27 27 ; If you rip this code, I will ./ your ass. =] 28 28 29 Include SPECIAL /FXTABLES.ASM29 Include SPECIAL\FXTABLES.asm 30 30 31 31 FX_MaxScanLine equ 384 32 32 FX_TotalCooperBars equ 7 33 33 34 FX_CalculateTables Proc Near 34 FX_CalculateTables Proc Near Uses 35 35 ; Calculate the Cooper-Bar Color-Table -> FX_CooperColors 36 36 mov di, offset FX_CooperColors … … 57 57 ; Out: *none* 58 58 ; Destroyed: DI - updated, +96 59 FX_MakeCooperBarColors Proc Near 59 FX_MakeCooperBarColors Proc Near Uses 60 60 mov bh, ah 61 61 shl bh, 4 … … 82 82 add di, 3 83 83 loop FX_MCBC_BuildColorLoop1 84 push ax 85 push bx 84 push ax bx 86 85 add ax, 0101h 87 86 add bl, 01h … … 93 92 mov es:[di+5], bl 94 93 add di, 6 95 pop bx 96 pop ax 94 pop bx ax 97 95 mov cx, 15 98 96 FX_MCBC_BuildColorLoop2: … … 111 109 ; If FX is active, we will modify the base segment for videoio to page 2, 112 110 ; so the screen will be generated there instead of the current page. 113 FX_StartScreen Proc Near 111 FX_StartScreen Proc Near Uses 114 112 test CFG_CooperBars, 1 115 113 jz FXSS_NoFX … … 122 120 ; If FX is active, we will copy the new screen to scroll area, do the FX, 123 121 ; copy the new screen to Page 0 and activate it. 124 FX_EndScreenLeft Proc Near 122 FX_EndScreenLeft Proc Near Uses 125 123 test CFG_CooperBars, 1 126 124 jnz FXESL_Go … … 143 141 FX_EndScreenLeft EndP 144 142 145 FX_ScrollScreenLeft Proc Near 143 FX_ScrollScreenLeft Proc Near Uses 146 144 mov FX_WideScrollerCurPos, 640 147 145 mov FX_WideScrollerDirection, 0 … … 151 149 FX_ScrollScreenLeft EndP 152 150 153 FX_EndScreenRight Proc Near 151 FX_EndScreenRight Proc Near Uses 154 152 test CFG_CooperBars, 1 155 153 jnz FXESR_Go … … 172 170 FX_EndScreenRight EndP 173 171 174 FX_ScrollScreenRight Proc Near 172 FX_ScrollScreenRight Proc Near Uses 175 173 mov FX_WideScrollerCurPos, 0 176 174 mov FX_WideScrollerDirection, 1 … … 180 178 FX_ScrollScreenRight EndP 181 179 182 FX_EndScreenInternalGo Proc Near 180 FX_EndScreenInternalGo Proc Near Uses 183 181 mov FX_WideScrollerSpeed, 1 184 182 mov FX_WideScrollerSpeedState, 1 … … 201 199 FX_EndScreenInternalGo EndP 202 200 203 FX_EndScreenInternalCleanUp Proc Near 201 FX_EndScreenInternalCleanUp Proc Near Uses 204 202 mov ax, -1 205 203 call FX_SetVideoStart … … 359 357 ; Out: *none* 360 358 ; Destroyed: all 361 FX_CalculateCoopers Proc Near 359 FX_CalculateCoopers Proc Near Uses 362 360 ; Logic: When Intro-State: Increase CooperPos by 1 till 256 -> then active 363 361 ; Active-State: Use SinusTable, till SinusPos=7Fh -> then Extro … … 416 414 FX_CalculateCoopers EndP 417 415 418 FX_CalculateWideScroller Proc Near 416 FX_CalculateWideScroller Proc Near Uses 419 417 mov bx, FX_WideScrollerCurPos 420 418 ;movzx cx, FX_WideScrollerSpeed … … 517 515 FX_CalculateWideScroller EndP 518 516 519 FX_WaitRetrace Proc Near 517 FX_WaitRetrace Proc Near Uses 520 518 mov dx, 3DAh 521 519 FX_WR1: … … 530 528 FX_WaitRetrace EndP 531 529 532 FX_WaitVRetrace Proc Near 530 FX_WaitVRetrace Proc Near Uses 533 531 mov dx, 3DAh 534 532 FX_WVR1: -
trunk/BOOTCODE/SPECIAL/LINUX.ASM
r37 r38 188 188 add di, LocIPT_Name 189 189 LSKN_SearchLoop: 190 push cx 191 push si 192 push di 190 push cx si di 193 191 mov cx, 11 194 192 repe cmpsb ; Compare total 11-bytes 195 pop di 196 pop si 197 pop cx 193 pop di si cx 198 194 je LSKN_Found 199 195 add di, LocIPT_LenOfIPT … … 228 224 ; Linux has 1 'BR' (which is crap) and some setup sectors 229 225 ; we load them at 9000:0, what a luck, we are at 8000:0 :-)) 230 push ds 231 push es 226 push ds es 232 227 mov ax, 9000h 233 228 mov es, ax … … 260 255 mov ax, 6000h 261 256 mov es, ax 262 ; Push Kernel-Entry-Pointer 263 push cx 264 push si 257 push cx si ; Push Kernel-Entry-Pointer 265 258 mov si, di 266 259 shl cx, 9 ; Sectors to Byte Count … … 269 262 shr cx, 1 270 263 rep movsw ; Copy Data... 271 ; Get Kernel-Entry-Pointer back 272 pop si 273 pop cx 264 pop si cx ; Get Kernel-Entry-Pointer back 274 265 LLL_GotAll: 275 pop es 276 pop ds 277 278 ; Push Missing-Sectors, StartCluster 279 push cx 280 push dx 266 pop es ds 267 268 push cx dx ; Push Missing-Sectors, StartCluster 281 269 mov ax, 9000h 282 270 mov ds, ax … … 348 336 stosb ; Write another NUL 349 337 pop cx 350 ; Pop StartCluster, Missing-Sectors 351 pop dx 352 pop bx 338 pop dx bx ; Pop StartCluster, Missing-Sectors 353 339 ; CX - Sector-Count of Kernel Image, DX - Starting Cluster of Kernel Image 354 340 ; BX - Sector-Count left over in 6000:0 area from Setup Code loading -
trunk/BOOTCODE/SPECIAL/LVM.ASM
r37 r38 24 24 ENDIF 25 25 26 LVM_InitCRCTable Proc Near 26 LVM_InitCRCTable Proc Near Uses 27 27 ; Initializes our LVM-CRC-Table 28 28 xor cl, cl … … 90 90 ; Out: Carry set, if valid LVM signature found 91 91 ; Destroyed: None 92 LVM_CheckSectorSignature Proc Near 92 LVM_CheckSectorSignature Proc Near Uses 93 93 test [CFG_IgnoreLVM], 1 ; We are supposed to ignore LVM, so 94 94 jnz LVMCSS_InvalidSignature ; any sector is bad! … … 176 176 LVM_GetDriveLetter Proc Near Uses bx cx dx si di ds es 177 177 ; For primary partitions this information is stored in the last 178 ; sector of track0; for all four partition entries in casethey179 ; they are allprimary ones.178 ; sector of track0; for all four partition entries should they 179 ; all be primary ones. 180 180 ; 181 181 ; LVM DLAT info for logical partitions is stored in the sector -
trunk/BOOTCODE/SPECIAL/VIRUS.ASM
r37 r38 33 33 mov di, offset CFG_VIR_INT08 34 34 push di 35 rep escasb35 rep scasb 36 36 pop di 37 37 jne VCFS_AlreadyInitiated … … 102 102 int 16h ; Waits for any keystroke 103 103 jmp VCFS_InitNow 104 105 104 VCFS_WhewThisIsOne: 106 call VIRUS_TryRestore 107 108 ; Code should no reach this since we halt the system in VIRUS_TryRestore. 109 ret 105 mov si, offset TXT_VirusFoundMain 106 call MBR_Teletype 107 ; Now check BackUp MBR for validation (AiRBOOT signature), do this 108 ; using direct-calls to original bios handler. 109 call ANTIVIR_RestoreMBR 110 jnc VCFS_ValidRestore 111 mov si, offset TXT_VirusFound1damn 112 call MBR_Teletype 113 call MBR_Teletype ; VirusFound1any 114 mov si, offset TXT_VirusFoundEnd 115 call MBR_Teletype 116 jmp MBR_HaltSystem 117 118 VCFS_ValidRestore: 119 mov si, offset TXT_VirusFound1ok 120 call MBR_Teletype 121 mov si, offset TXT_VirusFound1any 122 call MBR_Teletype 123 mov si, offset TXT_VirusFoundEnd 124 call MBR_Teletype 125 jmp MBR_HaltSystem 110 126 VIRUS_CheckForStealth EndP 111 112 ;113 ; This procedure is created to avoid jumping to labels that are local to114 ; procedures. JWasm does not allow that.115 ; Should be fixed better later.116 ;117 VIRUS_TryRestore Proc Near118 mov si, offset TXT_VirusFoundMain119 call MBR_Teletype120 ; Now check BackUp MBR for validation (AiRBOOT signature), do this121 ; using direct-calls to original bios handler.122 call ANTIVIR_RestoreMBR123 jnc VIRUS_TryRestore_ValidRestore124 125 mov si, offset TXT_VirusFound1damn126 call MBR_Teletype127 call MBR_Teletype ; VirusFound1any128 mov si, offset TXT_VirusFoundEnd129 call MBR_Teletype130 jmp MBR_HaltSystem131 132 VIRUS_TryRestore_ValidRestore:133 mov si, offset TXT_VirusFound1ok134 call MBR_Teletype135 mov si, offset TXT_VirusFound1any136 call MBR_Teletype137 mov si, offset TXT_VirusFoundEnd138 call MBR_Teletype139 jmp MBR_HaltSystem140 141 ; Code should not reach this since we halt the system.142 VIRUS_TryRestore Endp143 144 127 145 128 ; Checks system for normal-MBR-virus... (done by comparing current MBR with … … 148 131 ; Segment Registers preserved 149 132 VIRUS_CheckForVirus Proc Near Uses ds si es di 150 push cs 151 push cs 152 pop ds 153 pop es 133 push cs cs 134 pop ds es 154 135 mov bx, offset TmpSector 155 136 mov dx, 0080h … … 164 145 mov cx, 223 ; Compare 446 bytes 165 146 repz cmpsw ; if fail: Cross call to Stealth-Virus 166 ;jne VCFS_WhewThisIsOne 167 je VIRUS_CheckForVirus_end 168 call VIRUS_TryRestore 169 VIRUS_CheckForVirus_end: 147 jne VCFS_WhewThisIsOne 170 148 ret 171 149 VIRUS_CheckForVirus EndP … … 189 167 190 168 ; Will report Carry-Clear, if BackUp MBR is valid (supposingly) 191 ANTIVIR_CheckBackUpMBR Proc Near 192 push cs 193 push cs 194 pop es 195 pop ds 169 ANTIVIR_CheckBackUpMBR Proc Near Uses 170 push cs cs 171 pop es ds 196 172 mov bx, offset TmpSector 197 173 mov dx, 0080h … … 214 190 ANTIVIR_CheckBackUpMBR EndP 215 191 216 ANTIVIR_RestoreMBR Proc Near 192 ANTIVIR_RestoreMBR Proc Near Uses 217 193 call ANTIVIR_CheckBackUpMBR 218 194 jnc ARMBR_DoIt
Note:
See TracChangeset
for help on using the changeset viewer.
