forked from KolibriOS/kolibrios
1ba8b5fb96
git-svn-id: svn://kolibrios.org@1803 a494cfbc-eb01-0410-851d-a64ba20cac60
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 ; äãªæ¨ï 8: ®¯à¥¤¥«¨âì ¨ ¢ë¢¥á⨠ª®¯ªã
|
||
mov ebx,x*65536+dx ; [x ç «ìë©] *65536 + [x à §¬¥à]
|
||
mov ecx,y*65536+dy ; [y ç «ìë©] *65536 + [y à §¬¥à]
|
||
mov edx,nn ; ¨¤¥â¨ä¨ª â®à ª®¯ª¨ =1
|
||
mov esi,crgb ;0x116611 ; 梥⠪®¯ª¨ 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
|
||
;-----------------------梥â:0xRRGGBB
|
||
cBLACK = 0x000000 ; ç¥àë©
|
||
cRED = 0xFF0000 ; ªà áë©
|
||
cYELLOW = 0x3FFFF00 ; ¦¥«âë©
|
||
cGREEN = 0x00FF00 ; §¥«¥ë©
|
||
cNAVY = 0x0000FF ; ᨨ©
|
||
cMAGENTA = 0xFF00FF ; ¬ «¨®¢ë©
|
||
cBLUE = 0x00FFFF ; £®«ã¡®©
|
||
cWHITE = 0xFFFFFF ; ¡¥«ë©
|
||
cBROWN = 0x554433 ;
|
||
|
||
;-------------------------------
|
||
cMAGENTAl = 0xB800B8 ; magenta
|
||
cVIOLETl = 0xF800F8 ; 䨮«¥â®¢ë©
|
||
|