mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-18 21:02:34 +03:00
73 lines
1.6 KiB
PHP
73 lines
1.6 KiB
PHP
|
macro BeginProgram
|
|||
|
{
|
|||
|
use32
|
|||
|
org 0x0
|
|||
|
|
|||
|
db 'MENUET01'
|
|||
|
dd 0x01
|
|||
|
dd __start
|
|||
|
dd __end
|
|||
|
dd 0x10000 ;__memory
|
|||
|
dd 0x10000 ;__stack
|
|||
|
dd 0x0 ; dd __params
|
|||
|
dd 0x0
|
|||
|
__start:
|
|||
|
}
|
|||
|
|
|||
|
macro EndProgram
|
|||
|
{
|
|||
|
align 32
|
|||
|
rb 2048
|
|||
|
__end:
|
|||
|
;org 0x10000
|
|||
|
__stack:
|
|||
|
__memory:
|
|||
|
}
|
|||
|
|
|||
|
macro mButton nn,crgb,x,y,dx,dy
|
|||
|
{
|
|||
|
mov eax,8 ; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> 8: <EFBFBD><EFBFBD>।<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>뢥<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
mov ebx,x*65536+dx ; [x <EFBFBD><EFBFBD>砫<EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [x ࠧ<EFBFBD><EFBFBD><EFBFBD>]
|
|||
|
mov ecx,y*65536+dy ; [y <EFBFBD><EFBFBD>砫<EFBFBD><EFBFBD><EFBFBD><EFBFBD>] *65536 + [y ࠧ<EFBFBD><EFBFBD><EFBFBD>]
|
|||
|
mov edx,nn ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>䨪<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> =1
|
|||
|
mov esi,crgb ;0x116611 ; 梥<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RRGGBB
|
|||
|
int 0x40
|
|||
|
}
|
|||
|
|
|||
|
macro LoopBegin lab,begi
|
|||
|
{
|
|||
|
push ecx ; ECX->STACK store
|
|||
|
mov ecx,begi
|
|||
|
lab:
|
|||
|
push ecx ; ECX->STACK counter
|
|||
|
}
|
|||
|
|
|||
|
macro LoopEnd lab,endi
|
|||
|
{
|
|||
|
pop ecx ;ECX<-STACK counter
|
|||
|
inc ecx
|
|||
|
cmp ecx,endi
|
|||
|
jne lab
|
|||
|
pop ecx ;ECX<-STACK restore
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
;------------------------------------
|
|||
|
; constants
|
|||
|
;-----------------------梥<EFBFBD>:0xRRGGBB
|
|||
|
cBLACK = 0x000000 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cRED = 0xFF0000 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cYELLOW = 0x3FFFF00 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cGREEN = 0x00FF00 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cNAVY = 0x0000FF ; ᨭ<EFBFBD><EFBFBD>
|
|||
|
cMAGENTA = 0xFF00FF ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cBLUE = 0x00FFFF ; <EFBFBD><EFBFBD><EFBFBD>㡮<EFBFBD>
|
|||
|
cWHITE = 0xFFFFFF ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cBROWN = 0x554433 ;
|
|||
|
|
|||
|
;-------------------------------
|
|||
|
cMAGENTAl = 0xB800B8 ; magenta
|
|||
|
cVIOLETl = 0xF800F8 ; 䨮<EFBFBD><EFBFBD>⮢<EFBFBD><EFBFBD>
|
|||
|
|