Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. macro BeginProgram
  2.  {
  3.   use32
  4.   org 0x0
  5.  
  6.   db 'MENUET01'
  7.   dd 0x01
  8.   dd __start
  9.   dd __end
  10.   dd 0x10000   ;__memory
  11.   dd 0x10000   ;__stack
  12.   dd 0x0       ; dd __params
  13.   dd 0x0
  14.   __start:
  15.  }
  16.  
  17. macro EndProgram
  18.  {
  19.   align 32
  20.   rb 2048
  21.   __end:
  22.   ;org 0x10000
  23.   __stack:
  24.   __memory:
  25.  }
  26.  
  27. macro  mButton nn,crgb,x,y,dx,dy
  28. {
  29.         mov     eax,8               ; äã­ªæ¨ï 8: ®¯à¥¤¥«¨âì ¨ ¢ë¢¥á⨠ª­®¯ªã
  30.         mov     ebx,x*65536+dx      ; [x ­ ç «ì­ë©] *65536 + [x à §¬¥à]
  31.         mov     ecx,y*65536+dy      ; [y ­ ç «ì­ë©] *65536 + [y à §¬¥à]
  32.         mov     edx,nn              ; ¨¤¥­â¨ä¨ª â®à ª­®¯ª¨  =1
  33.         mov     esi,crgb            ;0x116611 ; 梥⠪­®¯ª¨ RRGGBB
  34.         int     0x40
  35. }
  36.  
  37. macro LoopBegin  lab,begi
  38. {
  39.         push  ecx                        ; ECX->STACK store
  40.         mov   ecx,begi
  41.   lab:
  42.         push  ecx                        ; ECX->STACK counter
  43. }
  44.  
  45. macro LoopEnd lab,endi
  46. {
  47.         pop   ecx                        ;ECX<-STACK counter
  48.         inc   ecx
  49.         cmp   ecx,endi
  50.         jne   lab
  51.         pop   ecx                        ;ECX<-STACK restore
  52. }
  53.  
  54.  
  55.  
  56. ;------------------------------------
  57. ; constants
  58. ;-----------------------梥â:0xRRGGBB
  59. cBLACK     = 0x000000 ; ç¥à­ë©
  60. cRED       = 0xFF0000 ; ªà á­ë©
  61. cYELLOW    = 0x3FFFF00 ; ¦¥«âë©
  62. cGREEN     = 0x00FF00 ; §¥«¥­ë©
  63. cNAVY      = 0x0000FF ; ᨭ¨©
  64. cMAGENTA   = 0xFF00FF ; ¬ «¨­®¢ë©
  65. cBLUE      = 0x00FFFF ; £®«ã¡®©
  66. cWHITE     = 0xFFFFFF ; ¡¥«ë©
  67. cBROWN     = 0x554433 ;
  68.  
  69. ;-------------------------------
  70. cMAGENTAl   = 0xB800B8 ; magenta
  71. cVIOLETl    = 0xF800F8 ; 䨮«¥â®¢ë©
  72.  
  73.