Changeset 42 in xtideuniversalbios for trunk/Assembly_Library/Src/Display/DisplayPrint.asm
- Timestamp:
- Sep 18, 2010, 6:04:31 PM (15 years ago)
- google:author:
- aitotat
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Assembly_Library/Src/Display/DisplayPrint.asm
r41 r42 2 2 ; Project name : Assembly Library 3 3 ; Created date : 26.6.2010 4 ; Last update : 1 0.8.20104 ; Last update : 18.9.2010 5 5 ; Author : Tomi Tilli 6 6 ; Description : Functions for display output. … … 250 250 251 251 ;-------------------------------------------------------------------- 252 ; DisplayPrint_RepeatCharacterFromALwithCountInCX253 ; Parameters:254 ; AL: Character to display255 ; CX: Repeat count256 ; DS: BDA segment (zero)257 ; ES:DI: Ptr to cursor location in video RAM258 ; Returns:259 ; DI: Updated offset to video RAM260 ; Corrupts registers:261 ; AX, DX262 ;--------------------------------------------------------------------263 ALIGN JUMP_ALIGN264 DisplayPrint_RepeatCharacterFromALwithCountInCX:265 push ax266 call DisplayPrint_CharacterFromAL267 pop ax268 loop DisplayPrint_RepeatCharacterFromALwithCountInCX269 ret270 271 272 ;--------------------------------------------------------------------273 ; DisplayPrint_CharacterFromAL274 ; Parameters:275 ; AL: Character to display276 ; DS: BDA segment (zero)277 ; ES:DI: Ptr to cursor location in video RAM278 ; Returns:279 ; DI: Updated offset to video RAM280 ; Corrupts registers:281 ; AX, DX282 ;--------------------------------------------------------------------283 ALIGN JUMP_ALIGN284 DisplayPrint_CharacterFromAL:285 mov ah, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute]286 jmp [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut]287 288 289 ;--------------------------------------------------------------------290 252 ; DisplayPrint_ClearScreen 291 253 ; Parameters: … … 317 279 ; ES:DI: Ptr to cursor location in video RAM 318 280 ; Returns: 319 ; Nothing281 ; DI: Updated offset to video RAM 320 282 ; Corrupts registers: 321 283 ; AX, DX … … 323 285 ALIGN JUMP_ALIGN 324 286 DisplayPrint_ClearAreaWithHeightInAHandWidthInAL: 287 push si 325 288 push cx 326 289 push bx 327 push di 328 329 xchg bx, ax ; Move parameters to BX 290 291 xchg bx, ax ; Area size to BX 330 292 call DisplayCursor_GetSoftwareCoordinatesToAX 331 xchg dx, ax ; Coordinates now in DX 332 xor cx, cx ; Zero CX 333 334 ALIGN JUMP_ALIGN 335 .ClearRowFromArea: 293 xchg si, ax ; Software (Y,X) coordinates now in SI 294 xor cx, cx 295 296 ALIGN JUMP_ALIGN 297 .ClearRowLoop: 298 mov cl, bl ; Area width now in CX 336 299 mov al, ' ' ; Clear with space 337 mov ah, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute] 338 mov cl, bl ; Area width = WORDs to clear 339 rep stosw 340 dec bh 341 jz SHORT .AreaCleared 342 343 inc dh ; Increment row 344 push dx 345 xchg ax, dx 300 call DisplayPrint_RepeatCharacterFromALwithCountInCX 301 302 xchg ax, si ; Coordinates to AX 303 inc ah ; Increment row 304 mov si, ax 346 305 call DisplayCursor_SetCoordinatesFromAX 347 pop dx 348 jmp SHORT .ClearRowFromArea 349 350 ALIGN JUMP_ALIGN 351 .AreaCleared: 352 pop di 353 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], di 306 dec bh ; Decrement rows left 307 jnz SHORT .ClearRowLoop 308 354 309 pop bx 355 310 pop cx 356 ret 311 pop si 312 ret 313 314 315 ;-------------------------------------------------------------------- 316 ; DisplayPrint_RepeatCharacterFromALwithCountInCX 317 ; Parameters: 318 ; AL: Character to display 319 ; CX: Repeat count 320 ; DS: BDA segment (zero) 321 ; ES:DI: Ptr to cursor location in video RAM 322 ; Returns: 323 ; DI: Updated offset to video RAM 324 ; Corrupts registers: 325 ; AX, DX 326 ;-------------------------------------------------------------------- 327 ALIGN JUMP_ALIGN 328 DisplayPrint_RepeatCharacterFromALwithCountInCX: 329 push ax 330 call DisplayPrint_CharacterFromAL 331 pop ax 332 loop DisplayPrint_RepeatCharacterFromALwithCountInCX 333 ret 334 335 336 ;-------------------------------------------------------------------- 337 ; DisplayPrint_CharacterFromAL 338 ; Parameters: 339 ; AL: Character to display 340 ; DS: BDA segment (zero) 341 ; ES:DI: Ptr to cursor location in video RAM 342 ; Returns: 343 ; DI: Updated offset to video RAM 344 ; Corrupts registers: 345 ; AX, DX 346 ;-------------------------------------------------------------------- 347 ALIGN JUMP_ALIGN 348 DisplayPrint_CharacterFromAL: 349 mov ah, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.bAttribute] 350 jmp [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fnCharOut]
Note:
See TracChangeset
for help on using the changeset viewer.