180,6 → 180,24 |
mov ax, 3 |
int 0x10 |
|
if lang eq ru |
; Load & set russian VGA font (RU.INC) |
mov bp, RU_FNT1 ; RU_FNT1 - First part |
mov bx, 1000h ; 768 bytes |
mov cx, 30h ; 48 symbols |
mov dx, 80h ; 128 - position of first symbol |
mov ax, 1100h |
int 10h |
|
mov bp, RU_FNT2 ; RU_FNT2 -Second part |
mov bx, 1000h ; 512 bytes |
mov cx, 20h ; 32 symbols |
mov dx, 0E0h ; 224 - position of first symbol |
mov ax, 1100h |
int 10h |
; End set VGA russian font |
end if |
|
; draw frames |
push 0xb800 |
pop es |
290,6 → 308,33 |
.nopci: |
; \end{Mario79} |
|
; mov al, 0xf6 ; Ñáðîñ êëàâèàòóðû, ðàçðåøèòü ñêàíèðîâàíèå |
; out 0x60, al |
; xor cx, cx |
;wait_loop: ; variant 2 |
; reading state of port of 8042 controller |
; in al, 64h |
; and al, 00000010b ; ready flag |
; wait until 8042 controller is ready |
; loopnz wait_loop |
|
;;;/diamond 5.02.2008 |
; set keyboard typematic rate & delay |
; mov al, 0xf3 |
; out 0x60, al |
; xor cx, cx |
;@@: |
; in al, 64h |
; test al, 2 |
; loopnz @b |
; mov al, 0 |
; out 0x60, al |
; xor cx, cx |
;@@: |
; in al, 64h |
; test al, 2 |
; loopnz @b |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; --------------- APM --------------------- |
and word [es:0x9044], 0 ; ver = 0.0 (APM not found) |
mov ax, 0x5300 |
451,6 → 496,10 |
pop dword [.oldtimer] |
push dword [.timer] |
pop dword [es:8*4] |
; mov eax, [es:8*4] |
; mov [.oldtimer], eax |
; mov eax, [.timer] |
; mov [es:8*4], eax |
sti |
; wait for keypressed |
xor ax,ax |
457,6 → 506,8 |
int 16h |
push ax |
; restore timer interrupt |
; push 0 |
; pop es |
mov eax, [.oldtimer] |
mov [es:8*4], eax |
mov [.timer], eax |
509,6 → 560,7 |
_setcursor 25,0 ; out of screen |
xor ax,ax |
int 0x16 |
; call clear_table_cursor ;clear current position of cursor |
|
mov si,word [cursor_pos] |
|
579,6 → 631,11 |
|
.change_b: |
_setcursor 15,0 |
; mov si, ask_dma |
; call print |
; mov bx, '13' |
; call getkey |
; mov [preboot_dma], al |
mov si, ask_bd |
call print |
mov bx, '12' |
635,7 → 692,23 |
mov bx, 18 |
xor dx, dx |
div bx |
|
if lang eq ru |
; ¯®¤®¦¤¨â¥ 5 ᥪã¤, 4/3/2 ᥪã¤ë, 1 ᥪã¤ã |
cmp al, 5 |
mov cl, ' ' |
jae @f |
cmp al, 1 |
mov cl, 'ã' |
jz @f |
mov cl, 'ë' |
@@: mov [time_str+9], cl |
else if lang eq et |
cmp al, 1 |
ja @f |
mov [time_str+9], ' ' |
mov [time_str+10],' ' |
@@: |
else |
; wait 5/4/3/2 seconds, 1 second |
cmp al, 1 |
mov cl, 's' |
642,6 → 715,7 |
ja @f |
mov cl, ' ' |
@@: mov [time_str+9], cl |
end if |
add al, '0' |
mov [time_str+1], al |
mov si, time_msg |
1070,12 → 1144,12 |
xor ax, ax |
mov es, ax |
|
mov bx, [es:0x9008] ; vga & 320x200 |
; mov bx, ax |
; cmp ax, 0x13 |
; je setgr |
; cmp ax, 0x12 |
; je setgr |
mov ax, [es:0x9008] ; vga & 320x200 |
mov bx, ax |
cmp ax, 0x13 |
je setgr |
cmp ax, 0x12 |
je setgr |
mov ax, 0x4f02 ; Vesa |
setgr: |
int 0x10 |
1083,24 → 1157,27 |
mov si, fatalsel |
jnz v_mode_error |
; set mode 0x12 graphics registers: |
; cmp bx, 0x12 |
; jne gmok2 |
; mov al, 0x05 |
; mov dx, 0x03ce |
; push dx |
; out dx, al ; select GDC mode register |
; mov al, 0x02 |
; inc dx |
; out dx, al ; set write mode 2 |
; mov al, 0x02 |
; mov dx, 0x03c4 |
; out dx, al ; select VGA sequencer map mask register |
; mov al, 0x0f |
; inc dx |
; out dx, al ; set mask for all planes 0-3 |
; mov al, 0x08 |
; pop dx |
; out dx, al ; select GDC bit mask register |
cmp bx, 0x12 |
jne gmok2 |
|
mov al, 0x05 |
mov dx, 0x03ce |
push dx |
out dx, al ; select GDC mode register |
mov al, 0x02 |
inc dx |
out dx, al ; set write mode 2 |
|
mov al, 0x02 |
mov dx, 0x03c4 |
out dx, al ; select VGA sequencer map mask register |
mov al, 0x0f |
inc dx |
out dx, al ; set mask for all planes 0-3 |
|
mov al, 0x08 |
pop dx |
out dx, al ; select GDC bit mask register |
; for writes to 0x03cf |
gmok2: |
push ds |