- Timestamp:
- Aug 29, 2013, 12:49:15 AM (11 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Inc/Macros.inc
r258 r566 1 1 ; Project name : Assembly Library 2 2 ; Description : This is the place to put various generic macros. 3 ; Should be included immediately after emulate.inc3 ; Should be included immediately after Emulate.inc 4 4 %ifndef MACROS_INC 5 5 %define MACROS_INC -
trunk/Assembly_Library/Src/Serial/SerialServer.asm
r526 r566 92 92 93 93 mov al,047h 94 inc dx ; 94 inc dx ; fifo 95 95 out dx,al 96 96 97 97 mov al,03h 98 inc dx ; 98 inc dx ; linecontrol 99 99 out dx,al 100 100 101 101 mov al,0bh 102 inc dx ; 103 out dx,al 104 105 inc dx ; 102 inc dx ; modemcontrol 103 out dx,al 104 105 inc dx ; linestatus (no output now, just setting up BH for later use) 106 106 mov bh,dl 107 107 … … 158 158 mov cx,0101h ; writing 256 words (plus 1) 159 159 160 s hr ah,1; command byte, are we doing a write?160 sahf ; command byte, are we doing a write? 161 161 jnc .readEntry 162 162 … … 285 285 ; taken care of this, but I have seen cases where this is not true. 286 286 ; 287 xor cx,cx 287 xor cx,cx ; timeout this clearing routine, in case the UART isn't there 288 288 .clearBuffer: 289 289 mov dl,bh … … 294 294 test al,1 295 295 in al,dx 296 loopnz .clearBuffer 296 loopnz .clearBuffer ; note ZF from test above 297 297 298 298 .clearBufferComplete: 299 mov al, 3 ; error return code and CF (low order bit)299 mov al, 1 ; error return code 300 300 301 301 ALIGN JUMP_ALIGN 302 302 SerialServer_OutputWithParameters_ReturnCodeInAL: 303 303 %if 0 304 sti ; 305 %endif 306 mov ah, al ; 307 308 pop bx ; 309 pop cx ; 304 sti ; all paths here will already have interrupts turned back on 305 %endif 306 mov ah, al ; for success, AL will already be zero 307 308 pop bx ; recover "ax" (command and count) from stack 309 pop cx ; recover saved sector count 310 310 xor ch, ch 311 311 sub cl, bl ; subtract off the number of sectors that remained … … 315 315 pop si 316 316 317 s hr ah, 1 ; shift down return code andCF317 sahf ; error return code to CF 318 318 319 319 ret … … 440 440 ; 441 441 sti 442 %ifndef SERIALSERVER_TIMER_LOCATION 442 443 mov cl,SerialServer_WaitAndPoll_SoftDelayTicks 443 %ifndef SERIALSERVER_TIMER_LOCATION444 444 call Timer_InitializeTimeoutWithTicksInCL 445 445 %else -
trunk/BIOS_Drive_Information_Tool/Src/Bios.asm
r526 r566 26 26 ; Nothing 27 27 ; Returns: (if no errors) 28 ; 28 ; DX: Number of hard drives in system 29 29 ; CF: Set if no hard drives found 30 30 ; Corrupts registers: … … 44 44 ; DL: BIOS drive number 45 45 ; Returns: (if no errors) 46 ; BL:Drive Type (for floppies only)46 ; BL: Drive Type (for floppies only) 47 47 ; AX: Sectors per track (1...63) 48 48 ; DX: Number of heads (1...255) … … 67 67 ; DH: Maximum head number (0...254) 68 68 ; Returns: 69 ; BL:Drive Type (for floppies only)69 ; BL: Drive Type (for floppies only) 70 70 ; AX: Sectors per track (1...63) 71 71 ; DX: Number of heads (1...255) … … 93 93 ; DL: BIOS drive number 94 94 ; Returns: (if no errors) 95 ; 96 ; 95 ; CX:DX: Total number of sectors 96 ; AH: BIOS Error code 97 97 ; CF: Cleared = no errors 98 98 ; Set = BIOS error code stored in AH … … 113 113 ; DL: BIOS drive number 114 114 ; Returns: (if no errors) 115 ; 116 ; 115 ; DS:BX: Ptr to ATA information 116 ; AH: BIOS Error code 117 117 ; CF: Cleared = no errors 118 118 ; Set = BIOS error code stored in AH … … 135 135 ; Returns: 136 136 ; AH: BIOS error code 137 ; 137 ; BX: Version of extensions 138 138 ; CX: Interface support bit map 139 139 ; CF: Cleared = no errors … … 163 163 ; DL: BIOS drive number 164 164 ; Returns: (if no errors) 165 ; 166 ; 165 ; DS:SI: Ptr to EDRIVE_INFO 166 ; AH: BIOS Error code 167 167 ; CF: Cleared = no errors 168 168 ; Set = BIOS error code stored in AH … … 184 184 ; Nothing 185 185 ; Returns: (if no errors) 186 ; 186 ; AH: BIOS Error code 187 187 ; CF: Set 188 188 ; Corrupts registers: -
trunk/XTIDE_Universal_BIOS/Inc/Controllers/Vision.inc
r558 r566 50 50 MASK_QD6580IDE_RECOVERY_TIME EQU MASK_QD6500IDE_RECOVERY_TIME 51 51 ; 0000b = 15 clocks, 1101b = 2 clocks 52 POSIT ON_QD65XXIDE_RECOVERY_TIMEEQU 452 POSITION_QD65XXIDE_RECOVERY_TIME EQU 4 53 53 54 54 -
trunk/XTIDE_Universal_BIOS/Src/Device/IDE/IdeError.asm
r526 r566 55 55 ALIGN JUMP_ALIGN 56 56 GetBiosErrorCodeToAHfromStatusAndErrorRegistersInAX: 57 test al, FLG_STATUS_BSY 58 jz SHORT .CheckErrorBitsFromStatusRegisterInAL 59 mov ah, RET_HD_TIMEOUT 60 jmp SHORT .ReturnBiosErrorCodeInAH 57 test al, FLG_STATUS_BSY | FLG_STATUS_DF | FLG_STATUS_CORR | FLG_STATUS_ERR ; Clears CF 58 jnz SHORT .CheckErrorBitsFromStatusRegisterInAL 59 ; The MSB of AL (FLG_STATUS_BSY) is cleared at this point. 60 cbw ; No errors, zero AH (CF already cleared) 61 ret 61 62 62 63 ALIGN JUMP_ALIGN 63 64 .CheckErrorBitsFromStatusRegisterInAL: 64 test al, FLG_STATUS_DF | FLG_STATUS_CORR | FLG_STATUS_ERR 65 jnz SHORT .ProcessErrorFromStatusRegisterInAL 66 xor ah, ah ; No errors, zero AH and CF 67 ret 68 69 .ProcessErrorFromStatusRegisterInAL: 65 js SHORT .Flg_Status_Bsy ; Jump if FLG_STATUS_BSY 70 66 test al, FLG_STATUS_ERR ; Error specified in Error register? 71 67 jnz SHORT .ConvertBiosErrorToAHfromErrorRegisterInAH … … 74 70 jnz SHORT .ReturnBiosErrorCodeInAH 75 71 mov ah, RET_HD_CONTROLLER ; Must be Device Fault 76 jmp SHORT .ReturnBiosErrorCodeInAH 72 SKIP2B bx 73 .Flg_Status_Bsy: 74 mov ah, RET_HD_TIMEOUT 75 .ReturnBiosErrorCodeInAH: 76 stc 77 ret 77 78 78 79 .ConvertBiosErrorToAHfromErrorRegisterInAH: 79 xor bx, bx ; Clear CF 80 stc ; Needed in case Error register (AH) is zero 81 mov bx, .rgbRetCodeLookup-1 80 82 .ErrorBitLoop: 81 rcr ah, 1 ; Set CF if error bit set82 jc SHORT .LookupErrorCode83 83 inc bx 84 test ah, ah ; Clear CF 85 jnz SHORT .ErrorBitLoop 86 .LookupErrorCode: 87 mov ah, [cs:bx+.rgbRetCodeLookup] 88 .ReturnBiosErrorCodeInAH: 89 stc ; Set CF since error 84 rcr ah, 1 85 jnc SHORT .ErrorBitLoop ; CF will be set eventually 86 mov ah, [cs:bx] 90 87 ret 88 91 89 92 90 .rgbRetCodeLookup: -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/AH9h_HInit.asm
r558 r566 106 106 jc .ReturnWithErrorCodeInAH 107 107 %else 108 jnc SHORT .ContinueInitializationSinceDriveSelectedSucces fully108 jnc SHORT .ContinueInitializationSinceDriveSelectedSuccessfully 109 109 jmp .ReturnWithErrorCodeInAH 110 .ContinueInitializationSinceDriveSelectedSucces fully:110 .ContinueInitializationSinceDriveSelectedSuccessfully: 111 111 %endif 112 112 -
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13hBiosInit.asm
r561 r566 28 28 ; Int 13h software interrupt handler. 29 29 ; This handler captures boot sector read from foreign drive when our 30 ; INT 19h is not called. This way we can for XTIDE Universal BIOS30 ; INT 19h is not called. This way we can force XTIDE Universal BIOS 31 31 ; initialization even without INT 19h being called. 32 32 ; -
trunk/XTIDE_Universal_BIOS/Src/Initialization/AdvancedAta/Vision.asm
r564 r566 179 179 test al, FLG_QDCONTROL_HDONLY_in 180 180 eCMOVNZ ah, FLG_QDCONTROL_NONATAPI ; Enable Read-Ahead and Post-Write Buffers 181 or ah, MASK_QDCONTROL_FLAGS_TO_SET182 181 mov al, ah 182 or al, MASK_QDCONTROL_FLAGS_TO_SET 183 183 out dx, al 184 184 sub dx, BYTE QD6580_CONTROL_REGISTER … … 187 187 ; QD6500 has only one channel that can be Primary at 1F0h or Secondary at 170h. 188 188 ; QD6580 always has Primary channel at 1F0h. Secondary channel at 170h can be Enabled or Disabled. 189 mov bx, [di+DPT.wBasePort] 190 cmp bx, DEVICE_ATA_PRIMARY_PORT 189 cmp WORD [di+DPT.wBasePort], DEVICE_ATA_PRIMARY_PORT 191 190 je SHORT .CalculateTimingTicksForQD6580 ; Primary Channel so no need to modify DX 192 191 times 2 inc dx ; Secondary Channel IDE Timing Register … … 216 215 217 216 ; Merge the values to a single byte to output 218 eSH IFT_IM al, POSITON_QD65XXIDE_RECOVERY_TIME, shl217 eSHL_IM al, POSITION_QD65XXIDE_RECOVERY_TIME 219 218 or al, bl 220 219 out dx, al
Note:
See TracChangeset
for help on using the changeset viewer.