Changeset 589 in xtideuniversalbios for trunk/Assembly_Library/Src
- Timestamp:
- May 22, 2016, 12:26:57 PM (9 years ago)
- Location:
- trunk/Assembly_Library/Src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/DisplayCharOut.asm
r526 r589 41 41 cmp al, ' ' ; Printable character? 42 42 jb SHORT DisplayCharOut_BiosTeletypeOutput 43 WAIT_RETRACE_IF_NECESSARY_THEN stosw 44 ret 43 JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN stosw 45 44 46 45 ALIGN DISPLAY_JUMP_ALIGN … … 96 95 xchg al, ah ; Swap character and attribute 97 96 inc di ; Skip character 98 WAIT_RETRACE_IF_NECESSARY_THEN stosb 99 ret 97 JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN stosb 100 98 101 99 ALIGN DISPLAY_JUMP_ALIGN 102 100 DisplayCharOut_Character: 103 WAIT_RETRACE_IF_NECESSARY_THEN stosb101 CALL_WAIT_FOR_RETRACE_IF_NECESSARY_THEN stosb 104 102 inc di ; Skip attribute 105 103 ret … … 107 105 ALIGN DISPLAY_JUMP_ALIGN 108 106 DisplayCharOut_CharacterWithAttribute: 109 WAIT_RETRACE_IF_NECESSARY_THEN stosw 110 ret 107 JMP_WAIT_FOR_RETRACE_IF_NECESSARY_THEN stosw 111 108 112 109 -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r526 r589 269 269 jz SHORT .CopyWithoutDisplayProcessing 270 270 271 WAIT_RETRACE_IF_NECESSARY_THEN rep movsb271 CALL_WAIT_FOR_RETRACE_IF_NECESSARY_THEN rep movsb 272 272 dec di ; Point to preceeding character instead of attribute 273 273 ret 274 274 275 ALIGN DISPLAY_JUMP_ALIGN 275 276 .CopyWithoutDisplayProcessing: -
trunk/Assembly_Library/Src/Display/DisplayPage.asm
r526 r589 43 43 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 44 44 %define EXCLUDE 45 %ifdef MODULE_HOTKEYS 46 %undef EXCLUDE 47 %endif 48 %ifdef MODULE_BOOT_MENU 45 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 49 46 %undef EXCLUDE 50 47 %endif -
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r580 r589 296 296 %undef EXCLUDE 297 297 %endif 298 %ifdef MODULE_HOTKEYS 299 %undef EXCLUDE 300 %endif 301 %ifdef MODULE_BOOT_MENU 298 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 302 299 %undef EXCLUDE 303 300 %endif -
trunk/Assembly_Library/Src/File/Drive.asm
r526 r589 86 86 xchg dx, ax ; Default drive to DL 87 87 call Drive_SetDefaultFromDL 88 eMOVZX cx, al; Number of potentially valid drive letters available89 cmp cl,3290 jb SHORT .Return91 mov cl, 32 92 ALIGN JUMP_ALIGN, ret 93 .Return: 88 cmp al, 32 ; Number of potentially valid drive letters available 89 jb SHORT .Below32 90 mov al, 32 91 .Below32: 92 cbw 93 xchg cx, ax 94 94 ret 95 95 … … 133 133 134 134 inc dx ; Default drive is 00h and first drive is 01h 135 mov ax, CHECK_IF_BLOCK_DEVICE_REMOTE ; Needs DOS 3.1+ 136 mov bx, dx 137 push dx 138 int DOS_INTERRUPT_21h 139 pop dx 140 jnc SHORT .DriveIsValid 141 cmp ax, ERR_DOS_INVALID_DRIVE 142 je SHORT .DriveIsNotValid 143 ; Fall back to old method if ERR_DOS_FUNCTION_NUMBER_INVALID 144 135 145 mov ah, GET_DOS_DRIVE_PARAMETER_BLOCK_FOR_SPECIFIC_DRIVE 136 146 int DOS_INTERRUPT_21h 147 .DriveIsValid: 148 .DriveIsNotValid: 137 149 dec dx 138 150 test al, al -
trunk/Assembly_Library/Src/Keyboard/Keyboard.asm
r581 r589 291 291 %ifdef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS 292 292 %define EXCLUDE 293 %ifdef MODULE_HOTKEYS 294 %undef EXCLUDE 295 %endif 296 %ifdef MODULE_BOOT_MENU 293 %ifdef MODULE_HOTKEYS OR MODULE_BOOT_MENU 297 294 %undef EXCLUDE 298 295 %endif -
trunk/Assembly_Library/Src/Menu/CharOutLineSplitter.asm
r526 r589 162 162 push si 163 163 push cx 164 WAIT_RETRACE_IF_NECESSARY_THEN rep movsb164 CALL_WAIT_FOR_RETRACE_IF_NECESSARY_THEN rep movsb 165 165 pop cx 166 166 pop si -
trunk/Assembly_Library/Src/Menu/Dialog/DialogFile.asm
r568 r589 239 239 ; AppendFileFromDTAinDSSItoOffScreenBuffer 240 240 ; Parameters: 241 ; CX: Files/director es found241 ; CX: Files/directories found 242 242 ; DL: Zero if root directory selected 243 243 ; DS:SI: Ptr to DTA containing file information -
trunk/Assembly_Library/Src/Menu/MenuLoop.asm
r581 r589 106 106 %ifndef MENU_NO_ESC 107 107 cmp al, ESC 108 je SHORT .LeaveMenuWithoutSelectingItem 109 %endif 110 cmp al, CR 111 je SHORT .SelectItem 112 113 test BYTE [bp+MENU.bFlags], FLG_MENU_USER_HANDLES_SCROLLING 114 jz SHORT MenuLoop_ProcessScrollingKeysFromAX 115 ret ; Return with CF cleared since keystroke not processed 116 117 %ifndef MENU_NO_ESC 118 ALIGN MENU_JUMP_ALIGN 119 .LeaveMenuWithoutSelectingItem: 108 jne SHORT .NotEscape 109 110 ; Leave menu without selecting item 120 111 call MenuEvent_ExitMenu 121 112 jnc SHORT .CancelMenuExit … … 128 119 129 120 ALIGN MENU_JUMP_ALIGN 130 .SelectItem: 121 .NotEscape: 122 cmp al, CR 123 jne SHORT .NotCarriageReturn 124 125 ; Select item 131 126 mov cx, [bp+MENUINIT.wHighlightedItem] 132 127 call MenuEvent_ItemSelectedFromCX 133 128 stc 134 ret 129 .Return: 130 ret 131 132 ALIGN MENU_JUMP_ALIGN 133 .NotCarriageReturn: 134 test BYTE [bp+MENU.bFlags], FLG_MENU_USER_HANDLES_SCROLLING 135 jnz SHORT .Return ; With CF cleared since keystroke not processed 136 ; Fall to MenuLoop_ProcessScrollingKeysFromAX 135 137 136 138 … … 172 174 .ChangeToPreviousPage: 173 175 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX 174 xchg ax, cx 175 neg ax 176 mov cx, [bp+MENUINIT.wHighlightedItem] 177 add cx, ax 176 neg cx 177 mov ax, cx 178 add cx, [bp+MENUINIT.wHighlightedItem] 178 179 jge SHORT .MoveHighlightedItemByAX ; No rotation for PgUp 179 180 ; Fall to .SelectFirstItem … … 187 188 .ChangeToNextPage: 188 189 call MenuScrollbars_GetMaxVisibleItemsOnPageToCX 189 xchg ax, cx 190 mov cx, [bp+MENUINIT.wHighlightedItem] 191 add cx, ax 190 mov ax, cx 191 add cx, [bp+MENUINIT.wHighlightedItem] 192 192 cmp cx, [bp+MENUINIT.wItems] 193 193 jb SHORT .MoveHighlightedItemByAX ; No rotation for PgDn -
trunk/Assembly_Library/Src/Serial/SerialServerScan.asm
r567 r589 46 46 47 47 test dx, dx 48 jnz shortSerialServerScan_CheckForServer_PortAndBaudInDX48 jnz SHORT SerialServerScan_CheckForServer_PortAndBaudInDX 49 49 50 mov di, .scanPortAddresses-151 mov ch, 1 ; tell server that we are scanning50 mov di, .scanPortAddresses-1 51 mov ch, 1 ; tell server that we are scanning 52 52 53 53 .nextPort: 54 54 inc di ; load next port address 55 xor dh, dh56 mov dl, [cs:di]55 mov dh, 40h ; Clear DH and make sure CF is set if error 56 mov dl, [cs:di] 57 57 eSHL_IM dx, 2 ; shift from one byte to two 58 stc ; setup error code for exit 59 jz .error 58 jz SHORT .error 60 59 61 60 ; … … 63 62 ; 64 63 push dx 65 add dl, Serial_UART_lineControl66 mov al, 09ah64 add dl, Serial_UART_lineControl 65 mov al, 9Ah 67 66 out dx, al 68 67 in al, dx 69 68 pop dx 70 cmp al, 09ah71 jn z.nextPort69 cmp al, 9Ah 70 jne SHORT .nextPort 72 71 73 mov al, 0 ch72 mov al, 0Ch 74 73 out dx, al 75 74 in al, dx 76 cmp al, 0 ch77 jn z.nextPort75 cmp al, 0Ch 76 jne SHORT .nextPort 78 77 79 78 ; … … 84 83 ; *on the server side* if the client side had a 4x clock multiplier, a 2x clock multiplier, or no clock multiplier. 85 84 ; 86 ; Starting with 30h, that means 30h (2400 baud), 18h (4800 baud), 0 ch (9600 baud), and85 ; Starting with 30h, that means 30h (2400 baud), 18h (4800 baud), 0Ch (9600 baud), and 87 86 ; 04h (28800 baud), 02h (57600 baud), 01h (115200 baud) 88 87 ; 89 ; Note: hardware baud multipliers (2x, 4x ) will impact the final baud rate and are not known at this level88 ; Note: hardware baud multipliers (2x, 4x, 8x) will impact the final baud rate and are not known at this level 90 89 ; 91 mov dh, 030h * 2 ; multiply by 2 since we are about to divide by 292 mov dl, [cs:di] ; restore single byte port address for scan90 mov dh, 30h * 2 ; multiply by 2 since we are about to divide by 2 91 mov dl, [cs:di] ; restore single byte port address for scan 93 92 94 93 .nextBaud: 95 shr dh, 196 jz .nextPort97 cmp dh, 6 ; skip from 6 to 4, to move from the top of the 9600 baud range98 jn z .testBaud; to the bottom of the 115200 baud range99 mov dh, 494 shr dh, 1 95 jz SHORT .nextPort 96 cmp dh, 6 ; skip from 6 to 4, to move from the top of the 9600 baud range 97 jne SHORT .testBaud ; to the bottom of the 115200 baud range 98 mov dh, 4 100 99 101 100 .testBaud: 102 101 call SerialServerScan_CheckForServer_PortAndBaudInDX 103 jc .nextBaud102 jc SHORT .nextBaud 104 103 105 104 .error: … … 135 134 SerialServerScan_CheckForServer_PortAndBaudInDX: 136 135 push bp ; setup fake SerialServer_Command 137 138 136 push dx ; send port baud and rate, returned in inquire packet 139 137 ; (and possibly returned in the drive identification string) 140 141 138 push cx ; send number of sectors, and if it is on a scan or not 142 143 mov bl,SerialServer_Command_Inquire ; protocol command onto stack with bh 139 mov bl, SerialServer_Command_Inquire ; protocol command onto stack with bh 144 140 push bx 145 141 146 mov bp,sp 147 142 mov bp, sp 148 143 call SerialServer_SendReceive 149 144 -
trunk/Assembly_Library/Src/Util/Math.asm
r526 r589 36 36 ALIGN JUMP_ALIGN 37 37 Math_DivQWatSSBPbyCX: 38 %if 1 38 39 xor dx, dx 39 40 mov ax, [bp+6] ; Load highest divident WORD to DX:AX … … 53 54 mov [bp], ax 54 55 ret 56 %else ; ~1 57 ; This is about half the size compared to the above code but it's not tested which is why it's commented away. 58 push di 59 mov di, 6 60 xor dx, dx 61 .Next: 62 mov ax, [bp+di] 63 div cx 64 mov [bp+di], ax 65 dec di 66 dec di 67 jns .Next 68 pop di 69 ret 70 %endif ; 1 55 71 %endif 56 72
Note:
See TracChangeset
for help on using the changeset viewer.