Changeset 293 in xtideuniversalbios for trunk/Configurator/Src/Libraries
- Timestamp:
- Mar 4, 2012, 1:33:52 AM (13 years ago)
- google:author:
- krille_n_@hotmail.com
- Location:
- trunk/Configurator/Src/Libraries
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Configurator/Src/Libraries/file.asm
r162 r293 162 162 ; ES:DI: Ptr to destination buffer 163 163 ; Returns: 164 ; AX: Number of bytes actually read if successful l(EOF check)164 ; AX: Number of bytes actually read if successful (EOF check) 165 165 ; DOS error code if CF set 166 ; CF: Clear if successful l166 ; CF: Clear if successful 167 167 ; Set if error 168 168 ; Corrupts registers: … … 194 194 ; ES:DI: Ptr to source buffer 195 195 ; Returns: 196 ; AX: Number of bytes actually written if successful l(EOF check)196 ; AX: Number of bytes actually written if successful (EOF check) 197 197 ; DOS error code if CF set 198 ; CF: Clear if successful l198 ; CF: Clear if successful 199 199 ; Set if error 200 200 ; Corrupts registers: … … 224 224 ; Returns: 225 225 ; AX: DOS error code if CF set 226 ; CF: Clear if successful l226 ; CF: Clear if successful 227 227 ; Set if error 228 228 ; Corrupts registers: … … 373 373 ; Returns: 374 374 ; AX: DOS Error code 375 ; CF: Clear if successful l375 ; CF: Clear if successful 376 376 ; Set if error 377 377 ; Corrupts registers: -
trunk/Configurator/Src/Libraries/menu/menudraw.asm
r181 r293 61 61 push cx 62 62 call MenuCrsr_GetCursor ; Get current cursor to DX 63 eMOVZX cx, BYTE [bp+MENUVARS.bWidth]; Load menu width63 eMOVZX cx, [bp+MENUVARS.bWidth] ; Load menu width 64 64 add cl, [bp+MENUVARS.bInitX] ; Add menu start X coord 65 65 sub cl, W_OFF_CRSR_STR & 0FFh ; Subtract right borders … … 164 164 call MenuCrsr_Point1stItem ; Set cursor position 165 165 mov cx, [bp+MENUVARS.wItemTop] ; Load idx of first menuitem to draw 166 eMOVZX dx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible menuitems166 eMOVZX dx, [bp+MENUVARS.bVisCnt] ; Load number of visible menuitems 167 167 MIN_U dx, [bp+MENUVARS.wItemCnt] ; Limit to item count 168 168 add dx, cx ; One past last menuitem to draw … … 266 266 call MenuDraw_TopBorder ; Draw top border 267 267 call MenuDraw_NewlineBrdr ; Change line 268 eMOVZX cx, BYTE [bp+MENUVARS.bTitleH]; Load number of title strings268 eMOVZX cx, [bp+MENUVARS.bTitleH] ; Load number of title strings 269 269 jcxz .Return ; Return if no title strings 270 270 ALIGN JUMP_ALIGN … … 284 284 xor dx, dx ; Zero DX 285 285 call MenuCrsr_PointNfoBrdr ; Set cursor 286 eMOVZX cx, BYTE [bp+MENUVARS.bInfoH]; Load number of info strings286 eMOVZX cx, [bp+MENUVARS.bInfoH] ; Load number of info strings 287 287 test BYTE [bp+MENUVARS.bFlags], FLG_MNU_HIDENFO ; Information hidden? 288 288 jnz SHORT .JumpToBottomBorder … … 320 320 xor dx, dx ; Zero DX 321 321 call MenuCrsr_PointItemBrdr ; Set cursor 322 eMOVZX cx, BYTE [bp+MENUVARS.bVisCnt]; Load max number of item strings322 eMOVZX cx, [bp+MENUVARS.bVisCnt] ; Load max number of item strings 323 323 ALIGN JUMP_ALIGN 324 324 .LineLoop: … … 374 374 mov dl, bh ; Leftmost 375 375 PRINT_CHAR 376 eMOVZX cx, BYTE[bp+MENUVARS.bWidth]376 eMOVZX cx, [bp+MENUVARS.bWidth] 377 377 times 2 dec cx ; Subtract borders 378 378 mov dl, bl ; Middle … … 438 438 mov dh, B_V ; Assume no scroll bars needed 439 439 mov ax, [bp+MENUVARS.wItemCnt] ; Load menuitem count to AX 440 eMOVZX bx, BYTE[bp+MENUVARS.bVisCnt] ; Load visible menuitems to BX440 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load visible menuitems to BX 441 441 cmp ax, bx ; Need scroll bars? 442 442 jbe .Return ; If not, return -
trunk/Configurator/Src/Libraries/menu/menufile.asm
r83 r293 1 ; File name : menufile.asm2 1 ; Project name : Menu library 3 ; Created date : 20.11.2009 4 ; Last update : 6.1.2011 5 ; Author : Tomi Tilli, 6 ; : Krister Nordvall (Optimizations) 7 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 8 3 ; Contains functions for displaying file dialog. 9 4 … … 276 271 ALIGN JUMP_ALIGN 277 272 .ChangeDone: 278 mov dx, [bp+FDLGVARS.fpFileSrch] ; Load ptr to file search str 279 mov ds, [bp+FDLGVARS.fpFileSrch+2] 273 lds dx, [bp+FDLGVARS.fpFileSrch] ; Load ptr to file search str 280 274 call MenuFile_GetItemCnt ; Get file count from new dir 281 275 pop ds … … 314 308 mov di, [bp+MSGVARS.wStrOff] ; Load string offset 315 309 mov es, [bp+MSGVARS.wStrSeg] ; Load string segment 316 eMOVZX cx, BYTE [bp+MENUVARS.bInfoH]; Load info line count to CX310 eMOVZX cx, [bp+MENUVARS.bInfoH] ; Load info line count to CX 317 311 call MenuDraw_MultilineStr ; Draw multiline str 318 312 pop di -
trunk/Configurator/Src/Libraries/menu/menuloop.asm
r9 r293 1 ; File name : menuloop.asm2 1 ; Project name : Menu library 3 ; Created date : 11.11.2009 4 ; Last update : 25.5.2010 5 ; Author : Tomi Tilli 6 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 7 3 ; Contains event dispatching loop. 8 4 … … 143 139 144 140 ; Jump to process menu key 145 mov di, CNT_MENU_KEYS-1 ; Convert CX... 141 mov di, CNT_MENU_KEYS-1 ; Convert CX... 146 142 sub di, cx ; ...to lookup index 147 143 shl di, 1 ; Prepare for word lookup … … 186 182 jnz .TextScrollUp ; If so, go to text scrolling 187 183 %endif 188 mov ax, [bp+MENUVARS.wItemSel] ; Load selected index 184 mov ax, [bp+MENUVARS.wItemSel] ; Load selected index 189 185 test ax, ax ; Already at top? 190 186 jz .KeyEnd ; If so, go to end … … 222 218 je .KeyHome ; If so, go to beginning 223 219 mov [bp+MENUVARS.wItemSel], ax ; Store new menuitem index 224 eMOVZX bx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible items220 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load number of visible items 225 221 add bx, [bp+MENUVARS.wItemTop] ; BX to one past last visible index 226 222 cmp ax, bx ; Need to scroll? … … 235 231 ALIGN JUMP_ALIGN 236 232 .TextScrollDown: 237 eMOVZX ax, BYTE [bp+MENUVARS.bVisCnt]; Load visible items233 eMOVZX ax, [bp+MENUVARS.bVisCnt] ; Load visible items 238 234 add ax, [bp+MENUVARS.wItemTop] ; Add topmost menuitem index 239 235 cmp ax, [bp+MENUVARS.wItemCnt] ; Already at the bottom? … … 261 257 sbb bh, 0 262 258 mov [bp+MENUVARS.wItemTop], bx ; Store first menuitem to draw 263 jnc .ScrollMenu 259 jnc .ScrollMenu 264 260 mov WORD [bp+MENUVARS.wItemTop], 0 ; Overflow, start with 0 265 261 jmp .ScrollMenu … … 284 280 inc ax ; Increment page 285 281 mul BYTE [bp+MENUVARS.bVisCnt] ; AX=First menuitem on page 286 eMOVZX bx, BYTE [bp+MENUVARS.bVisCnt]; Load number of visible items282 eMOVZX bx, [bp+MENUVARS.bVisCnt] ; Load number of visible items 287 283 add bx, ax ; BX now one past last visible 288 284 cmp bx, [bp+MENUVARS.wItemCnt] ; Went over last? … … 331 327 dw .KeyEnd ; KEY_END 332 328 ; Scan code to jump index translation table 333 .rgbKeyToIdx: 329 .rgbKeyToIdx: 334 330 db KEY_ENTER, KEY_ESC, KEY_UP, KEY_DOWN, 335 331 db KEY_PGUP, KEY_PGDN, KEY_HOME, KEY_END -
trunk/Configurator/Src/Libraries/menu/menumsg.asm
r181 r293 212 212 call MenuMsg_GetTokenForLine ; Get ptr to first token, length to AX 213 213 jnc .EndOfString ; Return if no tokens 214 eMOVZX dx, BYTE [bp+MENUVARS.bWidth]; Menu width214 eMOVZX dx, [bp+MENUVARS.bWidth] ; Menu width 215 215 sub dl, SIZE_MSG_HBRDR ; To line length 216 216 mov bl, ' ' ; Space character -
trunk/Configurator/Src/Libraries/menu/menuprog.asm
r2 r293 1 ; File name : menuprog.asm2 1 ; Project name : Menu library 3 ; Created date : 23.11.2009 4 ; Last update : 23.11.2009 5 ; Author : Tomi Tilli 6 ; Description : ASM library to menu system. 2 ; Description : ASM library for menu system. 7 3 ; Contains functions for displaying progress bar dialog. 8 4 … … 110 106 MenuProg_DrawBar: 111 107 ; Calculate number of chars to draw 112 eMOVZX cx, BYTE [bp+MENUVARS.bWidth]; Dialog width to CX108 eMOVZX cx, [bp+MENUVARS.bWidth] ; Dialog width to CX 113 109 sub cl, 4 ; Sub borders, CX=bar width 114 110 mul cl ; AX=bar with * percentage … … 117 113 sub cl, al ; CX=Empty char cnt 118 114 mov bl, al ; BX=full char cnt 119 115 120 116 ; Draw full chars 121 117 mov dl, FULL_BLCK ; Load full block char … … 180 176 push ds 181 177 push si 182 mov si, [bp+PDLGVARS.fpUser] ; Load offset to user ptr 183 mov ds, [bp+PDLGVARS.fpUser+2] ; Load segment to user ptr 178 lds si, [bp+PDLGVARS.fpUser] ; Load user defined ptr 184 179 xor ax, ax ; Zero percent 185 180 ALIGN JUMP_ALIGN -
trunk/Configurator/Src/Libraries/menu/prntvram.asm
r2 r293 1 ; File name : prntvram.asm2 1 ; Project name : Print library 3 ; Created date : 7.12.2009 4 ; Last update : 7.12.2009 5 ; Author : Tomi Tilli 6 ; Description : ASM library to for character and string 2 ; Description : ASM library for character and string 7 3 ; printing using direct access to VRAM. 8 4 ; … … 27 23 ;-------------------------------------------------------------------- 28 24 ; Return pointer to VRAM for current cursor position. 29 ; 25 ; 30 26 ; PrntVram_GetPtr 31 27 ; Parameters: … … 43 39 44 40 ; Calculate offset to VRAM 45 eMOVZX di, BYTE [es:BDA.bVidPageIdx]; Load page index41 eMOVZX di, [es:BDA.bVidPageIdx] ; Load page index 46 42 shl di, 1 ; Shift for word lookup 47 43 mov ax, [es:di+BDA.rgwVidCurPos] ; Load cursor position … … 70 66 ; use this macro to print characters (so printing implementation 71 67 ; can be easily modified when needed). 72 ; 68 ; 73 69 ; PRINT_CHAR 74 70 ; Parameters: … … 117 113 pop es 118 114 je .IncRow 119 115 120 116 ; Inc column only 121 117 push dx … … 147 143 ; use this macro to print strings (so printing implementation 148 144 ; can be easily modified when needed). 149 ; 145 ; 150 146 ; PRINT_STR 151 147 ; Parameters: … … 167 163 ; All string printing functions must use this macro to print strings 168 164 ; (so printing implementation can be easily modified when needed). 169 ; 165 ; 170 166 ; PRINT_STR_LEN 171 167 ; Parameters: … … 194 190 cmp al, 20h ; Printable character? 195 191 jb .Bios ; If not, use BIOS functions 196 192 197 193 push dx 198 194 mov al, dl 199 195 PRINT_CHAR 200 196 pop dx 201 197 202 198 ;stosb ; Store char to [ES:DI] 203 199 inc dx ; Increment chars printed
Note:
See TracChangeset
for help on using the changeset viewer.