Changeset 47 in xtideuniversalbios
- Timestamp:
- Oct 4, 2010, 7:22:40 PM (14 years ago)
- google:author:
- aitotat
- Location:
- trunk/Assembly_Library
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/DisplayCharOut.asm
r44 r47 2 2 ; Project name : Assembly Library 3 3 ; Created date : 26.6.2010 4 ; Last update : 22.9.20104 ; Last update : 4.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for outputting characters to video memory. … … 169 169 ; DX: CGA Status Register Address (3DAh) 170 170 ; Returns: 171 ; Interrupts disabled171 ; Nothing 172 172 ; Corrupts registers: 173 173 ; AL 174 174 ;-------------------------------------------------------------------- 175 175 %macro WAIT_UNTIL_SAFE_CGA_WRITE 0 176 cli ; Interrupt request would mess up timing177 176 %%WaitUntilNotInRetrace: 178 177 in al, dx … … 201 200 ALIGN JUMP_ALIGN 202 201 StosbWithoutCgaSnow: 203 call LoadAndVerifyStatusRegisterFromBDA202 call DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA 204 203 jne SHORT .StosbWithoutWaitSinceUnknownPort 205 204 206 205 mov ah, al 206 cli ; Interrupt request would mess up timing 207 207 WAIT_UNTIL_SAFE_CGA_WRITE 208 208 mov al, ah 209 .StosbWithoutWaitSinceUnknownPort: 209 210 stosb 210 211 sti 211 212 ret 212 ALIGN JUMP_ALIGN213 .StosbWithoutWaitSinceUnknownPort:214 stosb215 ret216 213 217 214 ALIGN JUMP_ALIGN 218 215 StoswWithoutCgaSnow: 219 call LoadAndVerifyStatusRegisterFromBDA 216 push bx 217 call DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA 220 218 jne SHORT .StoswWithoutWaitSinceUnknownPort 221 219 222 push bx223 220 xchg bx, ax 221 cli ; Interrupt request would mess up timing 224 222 WAIT_UNTIL_SAFE_CGA_WRITE 225 223 xchg ax, bx 224 .StoswWithoutWaitSinceUnknownPort: 226 225 stosw 227 226 pop bx 228 227 sti 229 228 ret 230 ALIGN JUMP_ALIGN 231 .StoswWithoutWaitSinceUnknownPort: 232 stosw 233 ret 234 235 ;-------------------------------------------------------------------- 236 ; LoadAndVerifyStatusRegisterFromBDA 229 230 231 ;-------------------------------------------------------------------- 232 ; DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA 237 233 ; Parameters: 238 234 ; DS: BDA segment (zero) … … 244 240 ;-------------------------------------------------------------------- 245 241 ALIGN JUMP_ALIGN 246 LoadAndVerifyStatusRegisterFromBDA:242 DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA: 247 243 mov dx, [BDA.wVidPort] 248 244 add dl, OFFSET_TO_CGA_STATUS_REGISTER -
trunk/Assembly_Library/Src/Display/DisplayFormat.asm
r44 r47 2 2 ; Project name : Assembly Library 3 3 ; Created date : 29.6.2010 4 ; Last update : 26.9.20104 ; Last update : 4.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for displaying formatted strings. … … 212 212 jle SHORT .NothingToAppendOrPrepend 213 213 214 mov bx, di 215 add bx, ax ; BX = DI after prepending 216 214 std 217 215 push si 218 dec di ; DI = Offset to last byte formatted 219 mov si, di 220 add di, ax ; DI = Offset to new location for last byte 221 std 216 217 lea si, [di-1] ; SI = Offset to last byte formatted 218 add di, ax ; DI = Cursor location after preceeding completed 219 push di 220 dec di ; DI = Offset where to move last byte formatted 221 xchg bx, ax ; BX = BYTEs to prepend 222 call .ReverseMoveCXbytesFromESSItoESDI 223 xchg ax, bx 224 call .ReversePrintAXspacesStartingFromESDI 225 226 pop di 227 pop si 228 cld ; Restore DF 229 .NothingToAppendOrPrepend: 230 ret 231 232 ;-------------------------------------------------------------------- 233 ; .ReverseMoveCXbytesFromESSItoESDI 234 ; Parameters: 235 ; CX: Number of bytes to move 236 ; DS: BDA segment (zero) 237 ; ES:SI: Ptr to source in video RAM 238 ; ES:DI: Ptr to destination in video RAM 239 ; Returns: 240 ; DI: Offset to character preceeding string just moved 241 ; Corrupts registers: 242 ; AX, CX, DX, SI 243 ;-------------------------------------------------------------------- 244 ALIGN JUMP_ALIGN 245 .ReverseMoveCXbytesFromESSItoESDI: 246 %ifdef ELIMINATE_CGA_SNOW 247 call DisplayCharOut_LoadAndVerifyStatusRegisterFromBDA 248 je SHORT .WaitUntilReadyToMoveNextByte 249 %endif 250 222 251 eSEG_STR rep, es, movsb 223 252 224 mov dl, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags] 225 and dx, BYTE FLG_CONTEXT_ATTRIBUTES 226 not dx 227 and di, dx ; WORD alignment when using attributes 228 253 %ifdef ELIMINATE_CGA_SNOW 254 jmp SHORT .AlignDIforFirstPreceedingSpace 255 .WaitUntilReadyToMoveNextByte: 256 cli ; Interrupt request would mess up timing 257 WAIT_UNTIL_SAFE_CGA_WRITE 258 .MovsbWithoutWaitSinceUnknownPort: 259 eSEG es 260 movsb 261 sti 262 loop .WaitUntilReadyToMoveNextByte 263 %endif 264 ; Fall to .AlignDIforFirstPreceedingSpace 265 266 ;-------------------------------------------------------------------- 267 ; .AlignDIforFirstPreceedingSpace 268 ; Parameters: 269 ; DS: BDA segment (zero) 270 ; ES:DI: Byte offset before last byte moved 271 ; Returns: 272 ; DI: Offset to space preceeding moved string 273 ; Corrupts registers: 274 ; AX 275 ;-------------------------------------------------------------------- 276 ALIGN JUMP_ALIGN 277 .AlignDIforFirstPreceedingSpace: 278 mov al, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bFlags] 279 and ax, BYTE FLG_CONTEXT_ATTRIBUTES 280 not ax 281 and di, ax 282 ret 283 284 ;-------------------------------------------------------------------- 285 ; .ReversePrintAXspacesStartingFromESDI 286 ; Parameters: 287 ; AX: Number of spaces to print 288 ; DS: BDA segment (zero) 289 ; ES:DI: Ptr to destination in video RAM 290 ; Returns: 291 ; DI: Updated 292 ; Corrupts registers: 293 ; AX, CX, DX 294 ALIGN JUMP_ALIGN 295 .ReversePrintAXspacesStartingFromESDI: 229 296 call DisplayContext_GetCharacterOffsetToAXfromByteOffsetInAX 230 297 xchg cx, ax ; CX = Spaces to prepend 231 298 mov al, ' ' 232 call DisplayPrint_RepeatCharacterFromALwithCountInCX 233 cld ; Restore DF 234 235 mov di, bx 236 pop si 237 .NothingToAppendOrPrepend: 238 ret 299 jmp DisplayPrint_RepeatCharacterFromALwithCountInCX 300 239 301 240 302 -
trunk/Assembly_Library/Src/Menu/MenuAttributes.asm
r46 r47 97 97 at ATTRIBUTE_CHARS.cTitle, db COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK) 98 98 at ATTRIBUTE_CHARS.cItem, db COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK) 99 at ATTRIBUTE_CHARS.cHighlightedItem, db COLOR_ATTRIBUTE(COLOR_B LACK, COLOR_WHITE)99 at ATTRIBUTE_CHARS.cHighlightedItem, db COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_WHITE) 100 100 at ATTRIBUTE_CHARS.cHurryTimeout, db COLOR_ATTRIBUTE(COLOR_BRIGHT_WHITE, COLOR_BLACK) | FLG_COLOR_BLINK 101 101 at ATTRIBUTE_CHARS.cNormalTimeout, db COLOR_ATTRIBUTE(COLOR_WHITE, COLOR_BLACK) -
trunk/Assembly_Library/Src/Menu/MenuTime.asm
r45 r47 2 2 ; Project name : Assembly Library 3 3 ; Created date : 25.7.2010 4 ; Last update : 28.9.20104 ; Last update : 4.10.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Menu timeouts other time related functions. … … 176 176 db DOUBLE_BOTTOM_LEFT_CORNER 177 177 db DOUBLE_LEFT_HORIZONTAL_TO_SINGLE_VERTICAL 178 db "%AAutoselection in %2 -us",NULL178 db "%AAutoselection in %2u s",NULL 179 179 180 180 ;-------------------------------------------------------------------- -
trunk/Assembly_Library/makefile
r42 r47 50 50 # Assembler preprocessor defines. # 51 51 ################################################################# 52 DEFINES = ELIMINATE_CGA_SNOW53 DEFINES_XT = 54 DEFINES_XTPLUS = USE_186 52 DEFINES = 53 DEFINES_XT = ELIMINATE_CGA_SNOW 54 DEFINES_XTPLUS = USE_186 ELIMINATE_CGA_SNOW 55 55 DEFINES_AT = USE_186 USE_286 USE_AT 56 56
Note:
See TracChangeset
for help on using the changeset viewer.