|
|
@ -274,9 +274,19 @@ DrawBG: |
|
|
|
|
|
|
|
; eax now = x^2 + y^2 |
|
|
|
|
|
|
|
imul eax, 7 |
|
|
|
mov ebx, [Zoom] |
|
|
|
sar ebx, 8 |
|
|
|
imul eax, ebx |
|
|
|
|
|
|
|
mov ebx, [ColorOffset] |
|
|
|
shr ebx, 8 |
|
|
|
mov bh, bl |
|
|
|
add ax, bx |
|
|
|
and ah, 0x7f |
|
|
|
|
|
|
|
; mov bh, al |
|
|
|
|
|
|
|
stosw |
|
|
|
|
|
|
|
; sar ebx, 8 |
|
|
|
|
|
|
@ -296,8 +306,6 @@ DrawBG: |
|
|
|
; pop edx |
|
|
|
; pop eax |
|
|
|
|
|
|
|
add ax, bx |
|
|
|
stosw |
|
|
|
|
|
|
|
inc ecx |
|
|
|
cmp ecx, 80 |
|
|
@ -325,6 +333,8 @@ WriteProtectedModeString: |
|
|
|
; je .ThereWasNothing |
|
|
|
; cmp al, 0xB6 ; Right Shift Break |
|
|
|
; je .ThereWasNothing |
|
|
|
cmp al, 0x01 |
|
|
|
je .KeyEscape |
|
|
|
cmp al, 0x4b; left |
|
|
|
je .KeyLeft |
|
|
|
cmp al, 0x48; up |
|
|
@ -333,6 +343,10 @@ WriteProtectedModeString: |
|
|
|
je .KeyDown |
|
|
|
cmp al, 0x4d; down |
|
|
|
je .KeyRight |
|
|
|
cmp al, 0x33; < |
|
|
|
je .KeyLess |
|
|
|
cmp al, 0x34; > |
|
|
|
je .KeyGreater |
|
|
|
; test al, 0x80 |
|
|
|
; je .ThereWasSomething |
|
|
|
.ThereWasNothing: |
|
|
@ -340,6 +354,9 @@ WriteProtectedModeString: |
|
|
|
jmp .PrintKeyLegend |
|
|
|
; lea esi, [ProtectedWelcomeStr] |
|
|
|
|
|
|
|
.KeyEscape: |
|
|
|
call Reboot |
|
|
|
jmp .PrintKeyLegend |
|
|
|
|
|
|
|
.KeyLeft: |
|
|
|
mov [Key], byte 'L' |
|
|
@ -356,6 +373,14 @@ WriteProtectedModeString: |
|
|
|
.KeyDown: |
|
|
|
mov [Key], byte 'D' |
|
|
|
add [Py], dword 1 |
|
|
|
jmp .PrintKeyLegend |
|
|
|
.KeyLess: |
|
|
|
mov [Key], byte '<' |
|
|
|
add [Zoom], dword -1 |
|
|
|
jmp .PrintKeyLegend |
|
|
|
.KeyGreater: |
|
|
|
mov [Key], byte '>' |
|
|
|
add [Zoom], dword 1 |
|
|
|
.PrintKeyLegend: |
|
|
|
lea esi, [ThereWasSomethingStr] |
|
|
|
|
|
|
@ -377,12 +402,17 @@ WriteProtectedModeString: |
|
|
|
rep stosw |
|
|
|
lea edi, [VIDEO + (80*24 + 1)*2] |
|
|
|
mov eax, dword [Px] |
|
|
|
sar eax, 6 |
|
|
|
sar eax, 4 |
|
|
|
call StringifyEax10 |
|
|
|
|
|
|
|
lea edi, [VIDEO + (80*24 + 10)*2] |
|
|
|
lea edi, [VIDEO + (80*24 + 11)*2] |
|
|
|
mov eax, dword [Py] |
|
|
|
sar eax, 6 |
|
|
|
sar eax, 4 |
|
|
|
call StringifyEax10 |
|
|
|
|
|
|
|
lea edi, [VIDEO + (80*24 + 21)*2] |
|
|
|
mov eax, dword [Zoom] |
|
|
|
sar eax, 8 |
|
|
|
call StringifyEax10 |
|
|
|
|
|
|
|
add [ColorOffset], dword 1 |
|
|
@ -449,6 +479,15 @@ StringifyEax10: |
|
|
|
.sign db ' ' |
|
|
|
|
|
|
|
|
|
|
|
; ------------------------------------------------------------------------------ |
|
|
|
Reboot: |
|
|
|
in al, 0x64 |
|
|
|
test al, 00000010b ; Wait for an empty Input Buffer |
|
|
|
jne Reboot |
|
|
|
mov al, 0xFE |
|
|
|
out 0x64, al ; Send the reboot call to the keyboard controller |
|
|
|
jmp Reboot |
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
|
;; Strings |
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;; |
|
|
@ -458,4 +497,5 @@ StringifyEax10: |
|
|
|
Px: dd 0 |
|
|
|
Py: dd 0 |
|
|
|
ColorOffset: dw 0 |
|
|
|
Zoom: dw 1 |
|
|
|
align 512 |