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