Menuet 64 v1.35.10 system calls for 32bit applications eax = function number int 0x40 = execute system call Index: 0 - Define and draw window 1 - Putpixel 2 - Get key 3 - Get system time 4 - Display text 5 - Delay 6 - Read file from floppy 7 - Putimage 8 - Define button 9 - Process info 10 - Wait for event 11 - Check for event 12 - Window redraw status 13 - Draw filled rectangle 14 - Get screen size 15 - Background 17 - Get button ID 18 - System 19 - Execute app from ramdisk 23 - Wait for event with timeout 26 - Get setup for devices 29 - Get date 37 - Read mouse data 38 - Display line 39 - Get background data 40 - Set bitfield for wanted events 47 - Display number to window 48 - Define general window properties 50 - Free form window shape and scale 51 - Create thread 52 - Stack driver status 53 - Socket interface 58 - File system 60 - Inter process communication 63 - Debug board 64 - Application memory resize 66 - Keyboard data mode 67 - Application window move / resize 113 - Vertical/Horizontal Scroll -1 - End application 00 - Define and draw window In : ebx - [x start] shl 16 + [x size] ecx - [y start] shl 16 + [y size] edx - Bits 00-23 - Window body color Bits 24-27 - Window type - Wtype 0/2 - Window with title area Wtype 1 - Reserve area - no window draw esi - bits 00-23 Grab bar color bit 24 - Window move disabled bit 31 - Color glide edi - Frame color - Wtype 4 - Window with title, menu and closebutton (id=1) esi - Zero or pointer to window label (asciiz) edi - Zero or pointer to menu struct Out: - 01 - Putpixel In : ebx - X ecx - Y edx - Pixel color 0x00RRGGBB Out: - 02 - Get key Out: al = 0 - Successful - ah = key al = 1 - No key in buffer 03 - Get system time Out: eax - 0x00SSMMHH seconds,minutes,hours 04 - Display text In : ebx - [x start]*65536 + [y start] ecx - Color edx - Pointer to text beginning esi - Text length or -1 for asciiz string Out: - 05 - Delay In : ebx - Delay in 1/100 secs Out: - 06 - Read file from floppy In : ebx - Pointer to filename (11 char) ecx - first block to read (0+) edx - blocks to read esi - Data return pointer Out: eax - filesize or 0xffffffff for error 07 - Putimage In : ebx - Pointer to image in memory (rrggbb,rrggbb,..) ecx - Image size [x]*65536+[y] edx - Image position in window [x]*65536+[y] Out: - 08 - Define button In : ebx - [x start]*65536 + [x size] ecx - [y start]*65536 + [y size] edx - Bits 00-23 - Button ID number Bit 30 - Button image is not drawn Bit 29 - Rectangle not drawn when pressed esi - Bit 29 - Define button label pointer in edi (asciiz) Out: - 09 - Process info In : ebx - Pointer to 1024 bytes table ecx - Process number (-1 = whoami) Out: eax - Number of processes Table: +00 dword cpu usage +04 word (position in window stack, ax or ax-1) +06 word (window stack value at ecx, 0) +10 11 db Name of the process +22 dword Start of processes memory +26 dword Memory used by process +30 dword PID of the process +34 dword Window x start +38 dword Window y start +42 dword Window x size +46 dword Window y size +50 word Process slot state 10 - Wait for event Out: eax - Event type - 1 window redraw - 2 key in buffer - 3 button pressed 11 - Check for event Out: eax - Event type - 0 no event - 1 window redraw - 2 key in buffer - 3 button pressed 12 - Window redraw status In : ebx - 1 Start of redraw - 2 End of redraw Out: - 13 - Draw filled rectangle In : ebx - [x start] shl 16 + [x size] ecx - [y start] shl 16 + [y size] edx - color 0xRRGGBB Out: - 14 - Get screen resolution Out: eax - X shl 16 + Y 15 - Background In : ebx 1 - Set background size ecx - Define background X size edx - Define background Y size ebx 3 - Draw background ebx 5 - Move image to os background memory ecx - Source in application memory edx - Position in os background memory esi - Bytes to move 17 - Get button ID Out: al 0 - Key in buffer (eax bits 08-31 has button ID) al 1 - No key in buffer 18 - System In : ebx - 4 - Get idle timestamp/second Out: eax - Timestamp/second In : ebx - 5 - Get timestamp/second Out: eax - Timestamp/second 19 - Execute application from ramdisk image In : ebx - Pointer to application name (11 char) ecx - Zero or pointer to parameter (asciiz) Out: eax - 23 - Wait for event with timeout In : ebx - Delay time in 1/100 of second Out: eax - Event type - 0 No event - 1 Window redraw - 2 Key in buffer - 3 Button 26 - Get setup for devices In : ebx 2 - ecx 1 - Keyboard base keymap to [edx+] ebx 9 - Uptime in 1/100 sec -> eax Out: eax - Return value 29 - Get date Out: eax - 0xYYDDMM year,date,month 35 - Get screen pixel In : ebx - Count from top left of screen Out: eax - Pixel 37 - Read mouse data In : ebx - 0 Screen relative ebx - 1 Window relative ebx - 2 Buttons pressed Out: eax - data 38 - Display line In : ebx - [x start] shl 16 + [x end] ecx - [y start] shl 16 + [y end] edx - 0x00RRGGBB Color Out: - 39 - Get background data In : ebx 1 - Get background size Out: eax=[x size] shl 16 + [y size] ebx 2 - Get background pixel ecx - Position at background memory map Out: eax = value ebx 4 - Get background type Out: eax=2 stretched 40 - Set bitfield for wanted events In : ebx - bitfield of wanted events default: ebx = 00000000 00000000 00000000 00000111b Events: I Window draw I Key in buffer I Button in buffer I I Desktop background draw I Mouse I IPC Out: - 47 - Display number In : ebx - Print type, bl=0 - ecx=value bl=1 - ecx=pointer bh=0 - display decimal bh=1 - display hexadecimal bh=2 - display binary bits 16-21 = number of digits to display (0-32) bits 22-31 = reserved ecx - Value or pointer edx - x shl 16 + y esi - Color Out: - 48 - Define general window properties In : ebx - 3 - Get defined window colors ecx - Pointer to return area edx - Bytes to return Out: - In : ebx - 4 - Get skin height Out: eax - Skin height 50 - Free form window shape and scale In : ebx - 0 Shape reference area ecx - Pointer to reference area byte per pixel (0=not used, 1=used, other=reserved) ebx - 1 Scale of reference area (default 1:1) ecx - Scale is set to 2^ecx Out: - 51 - Create thread In : ebx = 1 Create ecx Thread entry point edx Thread stack position Out: eax = PID or 0xfffffff0+ for error 52 - Stack driver status - See sys64.txt 53 - Socket interface - See sys64.txt 58 - File system In : ebx - Pointer to fileinfo block Fileinfo: dd 0 Read dd 0x0 First 512 byte block to read (0+) dd 0x1 Number of 512 byte blocks to read dd 0x20000 Return data pointer dd 0x10000 Work area for os - 16384 bytes db PATH asciiz dir & filename Out: eax - 0 Success or error code ebx - Size of file or Fileinfo: dd 1 Write dd 0x0 Ignored dd 10000 Bytes to write dd 0x20000 Source data pointer dd 0x10000 Work area for os - 16384 bytes db PATH ASCIIZ dir & filename Out: eax = 0 Success or error code or Fileinfo: dd 16 Start application dd 0x0 Ignored dd param 0 or parameter area (asciiz) Receiving application must reserve a 256 byte area dd 0x0 Ignored dd 0x10000 Work area for os - 16384 bytes db PATH asciiz dir & filename Out: eax = pid or 0xfffffff0+ for error 60 - Inter process communication In : ebx - 1 Define IPC memory ecx = Pointer to IPC memory area (ipcmem) ipcmem: dd 0 ; IPC area reserve (0/1) dd 8 ; Relative pointer to message area from ipcmem When a message is received: - bytes 0-3 = sender PID - bytes 4-7 = size of message - bytes 8- = message Out: eax - status In : ebx - 2 Send message ecx = receiver pid edx = pointer to message esi = message length Out: - 63 - Debug board In : ebx - 1 Write byte (cl=byte) Out: - In : ebx - 2 Read byte Out: ebx = 0 -> empty buffer (eax=0) ebx = 1 -> byte in al 64 - Application memory resize In : ebx - 1 Set amount of memory ecx New amount of memory Out: eax - 0 Success eax - 1 Out of memory 66 - Keyboard data mode In : ebx - 1 Set mode ecx - 0 Keymap ecx - 1 Scancodes ebx - 2 Get mode - return in eax ebx - 3 Get ctrl alt shift state - return in eax Out: eax 67 - Application window move / resize In : ebx - New x start ecx - New y start edx - New x size esi - New y size Out: - Specifying any parameter as -1 will leave the parameter unchanged. 113- Vertical/Horizontal Scroll Vertical scroll (1) In : ebx - 1 shl 16 + X start ecx - Y start shl 16+ Y size edx - Scroll value start esi - Scroll value size edi - Current scroll value Out: - Horizontal scroll (2) In : ebx - 2 shl 16 + Y start ecx - X start shl 16+ X size edx - Scroll value start esi - Scroll value size edi - Current scroll value Out: - -1 - End application In : - Out: -