system/MyKey: Post-SVN clean up
All checks were successful
Build system / Check kernel codestyle (pull_request) Successful in 22s
Build system / Build (pull_request) Successful in 4m23s

- Fix ASM include paths.
- Note: Line endings standardised from `CRLF` > `LF`, so best to view diffs with whitespace changes hidden.
This commit is contained in:
2025-05-20 19:24:29 +01:00
parent 03da8574be
commit 311de65cb6

View File

@@ -1,163 +1,165 @@
include '../../../proc32.inc' ; SPDX-License-Identifier: NOASSERTION
;
macro start_draw_window x,y,xsize,ysize,areacolor,caption,capsize
{ include '../../proc32.inc'
;pusha
mov eax, 12 ; function 12:tell os about windowdraw macro start_draw_window x,y,xsize,ysize,areacolor,caption,capsize
mov ebx, 1 ; 1, start of draw {
int 0x40 ;pusha
; DRAW WINDOW mov eax, 12 ; function 12:tell os about windowdraw
mov eax, 0 ; function 0 : define and draw window mov ebx, 1 ; 1, start of draw
mov ebx, x*65536+xsize ; [x start] *65536 + [x size] int 0x40
mov ecx, y*65536+ysize ; [y start] *65536 + [y size] ; DRAW WINDOW
mov edx, areacolor ; color of work area RRGGBB mov eax, 0 ; function 0 : define and draw window
mov esi, 0x00334455 ; color of grab bar RRGGBB mov ebx, x*65536+xsize ; [x start] *65536 + [x size]
mov edi, 0x00ddeeff ; color of frames RRGGBB mov ecx, y*65536+ysize ; [y start] *65536 + [y size]
int 0x40 mov edx, areacolor ; color of work area RRGGBB
; WINDOW LABEL mov esi, 0x00334455 ; color of grab bar RRGGBB
mov eax, 4 ; function 4 : write text to window mov edi, 0x00ddeeff ; color of frames RRGGBB
mov ebx, 8*65536+8 ; [x start] *65536 + [y start] int 0x40
mov ecx, 0x0;0ffffff ; color of text RRGGBB ; WINDOW LABEL
mov edx, caption ; pointer to text beginning mov eax, 4 ; function 4 : write text to window
mov esi, capsize ; text length mov ebx, 8*65536+8 ; [x start] *65536 + [y start]
int 0x40 mov ecx, 0x0;0ffffff ; color of text RRGGBB
;popa mov edx, caption ; pointer to text beginning
} mov esi, capsize ; text length
int 0x40
macro end_draw_window ;popa
{ }
mov eax, 12 ; end of redraw
mov ebx, 2 macro end_draw_window
int 0x40 {
} mov eax, 12 ; end of redraw
mov ebx, 2
macro change_window_place_size x,y,xsize,ysize int 0x40
{ }
mov eax, 67 ; function 67 : replace and/or resize window
mov ebx, x macro change_window_place_size x,y,xsize,ysize
mov ecx, y {
mov edx, xsize mov eax, 67 ; function 67 : replace and/or resize window
mov esi, ysize mov ebx, x
int 0x40 mov ecx, y
} mov edx, xsize
mov esi, ysize
proc draw_button stdcall, x:dword, y:dword, xsize:dword, ysize:dword, \ int 0x40
id:dword, butcolor:dword, text:dword, textlen:byte, textcolor:dword }
pusha proc draw_button stdcall, x:dword, y:dword, xsize:dword, ysize:dword, \
mov ebx, dword [x] id:dword, butcolor:dword, text:dword, textlen:byte, textcolor:dword
shl ebx, 16
add ebx, dword [xsize] ; [x start] *65536 + [x size] pusha
mov ebx, dword [x]
mov ecx, dword [y] shl ebx, 16
shl ecx, 16 add ebx, dword [xsize] ; [x start] *65536 + [x size]
add ecx, dword [ysize] ; [y start] *65536 + [y size]
mov ecx, dword [y]
mov edx, dword [id] ; button id shl ecx, 16
mov esi, dword [butcolor] ; button color RRGGBB add ecx, dword [ysize] ; [y start] *65536 + [y size]
mov eax, 8 ; function 8 : define and draw button
int 0x40 mov edx, dword [id] ; button id
mov esi, dword [butcolor] ; button color RRGGBB
mov ebx, dword [x] mov eax, 8 ; function 8 : define and draw button
add ebx, 5 int 0x40
shl ebx, 16
mov eax, dword [ysize] mov ebx, dword [x]
sub eax, 5 add ebx, 5
shr eax, 1 shl ebx, 16
add ebx, eax mov eax, dword [ysize]
add ebx, dword [y] ;mov ebx, (x+5)*65536+y+(ysize-5)/2 ; Draw button text sub eax, 5
shr eax, 1
mov ecx, dword [textcolor] add ebx, eax
mov edx, dword [text] add ebx, dword [y] ;mov ebx, (x+5)*65536+y+(ysize-5)/2 ; Draw button text
xor eax, eax
mov al, byte [textlen] mov ecx, dword [textcolor]
mov esi, eax mov edx, dword [text]
mov eax, 4 xor eax, eax
int 0x40 mov al, byte [textlen]
popa mov esi, eax
ret mov eax, 4
endp int 0x40
popa
;macro outtextxy x,y,prompt,prompt_len,color ret
;{ endp
proc outtextxy stdcall, x:dword, y:dword, prompt:dword, prompt_len:dword, color:dword
pusha ;macro outtextxy x,y,prompt,prompt_len,color
mov eax, 4 ;{
mov ebx, dword [x] ; draw info text with function 4 proc outtextxy stdcall, x:dword, y:dword, prompt:dword, prompt_len:dword, color:dword
shl ebx, 16 pusha
or ebx, dword [y] mov eax, 4
mov ecx, dword [color] mov ebx, dword [x] ; draw info text with function 4
mov edx, dword [prompt] shl ebx, 16
mov esi, dword [prompt_len] or ebx, dword [y]
test esi, esi mov ecx, dword [color]
jnz @f mov edx, dword [prompt]
or ecx, 0x80000000 mov esi, dword [prompt_len]
@@: test esi, esi
int 0x40 jnz @f
popa or ecx, 0x80000000
ret @@:
endp int 0x40
;} popa
ret
;proc bar x:dword, y:dword, xsize:dword, ysize:dword, color:dword endp
macro bar x, y, xsize, ysize, color ;}
{
pusha ;proc bar x:dword, y:dword, xsize:dword, ysize:dword, color:dword
mov eax, 13 macro bar x, y, xsize, ysize, color
;mov ebx, [x] {
;shl ebx, 16 pusha
;add ebx, [xsize] mov eax, 13
;mov ecx, [y] ;mov ebx, [x]
;shl ecx, 16 ;shl ebx, 16
;add ecx, [ysize] ;add ebx, [xsize]
;mov edx, [color] ;mov ecx, [y]
mov ebx, x*65536+xsize ;shl ecx, 16
mov ecx, y*65536+ysize ;add ecx, [ysize]
mov edx, color ;mov edx, [color]
mov ebx, x*65536+xsize
int 0x40 mov ecx, y*65536+ysize
popa mov edx, color
;ret
;endp int 0x40
} popa
;ret
macro line x1,y1,x2,y2,color ;endp
{ }
pusha
mov eax, 38 macro line x1,y1,x2,y2,color
mov ebx, x1*65536+x2 {
mov ecx, y1*65536+y2 pusha
mov edx, color mov eax, 38
int 0x40 mov ebx, x1*65536+x2
popa mov ecx, y1*65536+y2
} mov edx, color
int 0x40
macro rectangle x,y,xsize,ysize,color popa
{ }
x2=x+xsize
y2=y+ysize macro rectangle x,y,xsize,ysize,color
line x,y,x2,y,color {
line x,y,x,y2,color x2=x+xsize
line x,y2,x2,y2,color y2=y+ysize
line x2,y,x2,y2,color line x,y,x2,y,color
} line x,y,x,y2,color
line x,y2,x2,y2,color
macro rectangle2 x,y,xsize,ysize,color1,color2 line x2,y,x2,y2,color
{ }
x2=x+xsize
y2=y+ysize macro rectangle2 x,y,xsize,ysize,color1,color2
line x,y,x2,y,color1 {
line x,y,x,y2,color1 x2=x+xsize
line x,y2,x2,y2,color2 y2=y+ysize
line x2,y,x2,y2,color2 line x,y,x2,y,color1
} line x,y,x,y2,color1
line x,y2,x2,y2,color2
macro putpixel x,y,color line x2,y,x2,y2,color2
{ }
mov eax, 1
mov ebx, x macro putpixel x,y,color
mov ecx, y {
mov edx, color mov eax, 1
int 0x40 mov ebx, x
} mov ecx, y
mov edx, color
int 0x40
}