source: xtideuniversalbios/trunk/Assembly_Library/Src/Display/DisplayPage.asm@ 373

Last change on this file since 373 was 370, checked in by krille_n_@…, 13 years ago

Changes:

  • Added some missing PIO mode timings to ATA_ID.inc (based on info from http://www.singlix.net/specs/cfspc4_0.pdf)
  • Updated Configuration_FullMode.txt but it may need additional changes as the Tandy info doesn't match the wiki.
  • Optimizations.
  • Excluded some unused code from XTIDECFG.
File size: 1.9 KB
Line 
1; Project name : Assembly Library
2; Description : Functions for managing display page.
3
4; Section containing code
5SECTION .text
6
7;--------------------------------------------------------------------
8; DisplayPage_SetFromAL
9; Parameters:
10; AL: New display page
11; DS: BDA segment (zero)
12; Returns:
13; Nothing
14; Corrupts registers:
15; AX, DX
16;--------------------------------------------------------------------
17%ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS OR EXCLUDE_FROM_XTIDECFG
18ALIGN DISPLAY_JUMP_ALIGN
19DisplayPage_SetFromAL:
20 xor ah, ah
21 mul WORD [VIDEO_BDA.wBytesPerPage] ; AX = Offset to page
22 mov [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition], ax
23 ret
24%endif
25
26
27;--------------------------------------------------------------------
28; DisplayPage_GetColumnsToALandRowsToAH
29; Parameters:
30; DS: BDA segment (zero)
31; Returns:
32; AL: Number of columns in selected text mode
33; AH: Number of rows in selected text mode
34; Corrupts registers:
35; Nothing
36;--------------------------------------------------------------------
37ALIGN DISPLAY_JUMP_ALIGN
38DisplayPage_GetColumnsToALandRowsToAH:
39 mov al, [VIDEO_BDA.wColumns] ; 40 or 80
40 mov ah, 25 ; Always 25 rows on standard text modes
41 ret
42
43
44;--------------------------------------------------------------------
45; DisplayPage_SynchronizeToHardware
46; Parameters:
47; DS: BDA segment (zero)
48; Returns:
49; Nothing
50; Corrupts registers:
51; AX, DX
52;--------------------------------------------------------------------
53ALIGN DISPLAY_JUMP_ALIGN
54DisplayPage_SynchronizeToHardware:
55 xor dx, dx
56 mov ax, [VIDEO_BDA.displayContext+DISPLAY_CONTEXT.fpCursorPosition]
57 div WORD [VIDEO_BDA.wBytesPerPage] ; AX = Page
58
59 cmp al, [VIDEO_BDA.bActivePage]
60 je SHORT .Return ; Same page, no need to synchronize
61 mov ah, SELECT_ACTIVE_DISPLAY_PAGE
62 int BIOS_VIDEO_INTERRUPT_10h
63.Return:
64 ret
Note: See TracBrowser for help on using the repository browser.