📄 新建 文本文档 (3).txt
字号:
Menuet 64 v0.88 system calls
rax : function number
int 0x60 : system call
Index:
0 - Define and draw window
1 - Putpixel
2 - Get key
3 - Get date and time
4 - Display text
5 - Delay
7 - Display image
8 - Define and draw button
9 - Get process info
10 - Wait for event
11 - Check for event
12 - Window draw state
13 - Display filled rectangle
15 - Define and draw background
17 - Get pressed button info
23 - Wait for event with timeout
26 - Get general system info
35 - Get pixel of screen
37 - Get mouse data
38 - Draw Line
40 - Set bitfield for wanted events
42 - Read data from IRQ
44 - Define ports to read at IRQ
45 - Reserve/Free IRQ for data read
46 - Reserve/Free port for direct read and write
47 - Display number
50 - Define freeform and transparent window
51 - Threads
52 - Network interface
53 - Network interface
58 - Filesystem
60 - Inter process communication
61 - Direct screen access
63 - System debug info
64 - Application memory resize
66 - Keyboard data mode
67 - Window move and resize
105 - Delay (ms)
110 - Get data from running process
111 - Who am I
112 - Get configuration parameter
113 - Vertical and horizontal scroll bars
114 - CD audio
115 - PCI
116 - Driver state access
117 - Audio
118 - MIDI
119 - Draw Circle
120 - Window Skinning
121 - Drag'n drop
122 - 3D API
123 - Wait for event with timeout (ms)
124 - Window hide, show, activate
125 - Window transparency
126 - Switch process to 32bit or 64bit mode
127 - USB 2.0 device information
128 - USB 2.0 webcam interface
129 - USB 2.0 printer interface
256 - Start process
500 - System
512 - Terminate process
-
0 - Define and draw window
In : rbx - X start shl 32 & x size
rcx - Y start shl 32 & y size
rdx - Type shl 32 & border color
Type 0 = Draw window
Type 1 = Do not draw window
Bit 63 = 0/1 Window move enabled/disabled
rex - Draw buttons - close,full,minimize
rfx - 0 or pointer to window label ( asciiz )
rgx - 0 or pointer to menu struct
Out: -
1 - Putpixel
In : rbx - X
rcx - Y
rdx - Color
Out: -
2 - Get key
In : -
Out: rax - 0 Request success
rbx - CU bits
U = 0 - key down
1 - key up
C = 0 - ascii ( utf8 )
1 - extended key
rcx - Key, ascii ( utf8 ) or extended
rax - 1 No key in buffer for requestor
3 - Get date and time
In : rax = 1 - Get time
2 - Get date
Out: rax - Time 0x0000000000SSMMHH
- Date 0x00000000DWDDMMYY
4 - Display text
In : rbx - Pointer to string ( asciiz )
rcx - X position
rdx - Y position
rfx - Font - 1 - Fixed size 5x9
2 - Fixed size 7x9
3 - rgx - Height
4 - rgx - Height
5 - rgx - Height
6 - rgx - Height
rsi - Color
Out: -
5 - Delay
In : rbx - Delay 1/100s
Out: -
See also system call 105
7 - Display image
In : rbx - X start & size
rcx - Y start & size
rdx - Pointer to first pixel ( rrggbb ) to display
rex - Scanline difference ( 0 for continuous picture data )
rfx - Transparency color ( 0x1000000 for no transparency )
rgx - Pixel alignment ( 3 for RRggbbRRggbb )
Out: -
8 - Define and draw button
In : rbx - X start & size
rcx - Y start & size
rdx - Button ID
rex - Flags & Color(ignored)
- bit 63 = do not draw the image
- bit 62 = report button down
rfx - Pointer to button label ( asciiz ) or Zero
Out: -
9 - Get process info
In : rbx 1 - By process slot
rcx - Process slot
rdx - Pointer to return area
rex - Bytes to return
Out: Data returned to [rdx]
See table 9-1
In : rbx 2 - By process PID
rcx - Process PID
rdx - Pointer to return area
rex - Bytes to return
Out: Data returned to [rdx]
See table 9-1
10 - Wait for event
In : -
Out: rax - Bitfield of event(s)
0 .. 0 0 0 0 1 1 1
| | | | | | | |
| | | | | | | ---- 00 Window redraw
| | | | | | ------ 01 Key press
| | | | | -------- 02 Button press
| | | | ---------- 03 [unused]
| | | ------------ 04 Background change
| | -------------- 05 Mouse event
| ---------------- 06 IPC event
| 07+ [unused]
--------------------- 32+ IRQ events
11 - Check for event
In : -
Out: rax - Bitfield of event(s)
12 - Window draw state
In : rbx - 1 Start of draw
rbx - 2 End of draw
Out: -
In : rbx - 3 End of draw. Returns window draw
limits, screen relative.
Out: rax - X start shl 32 + X end
rbx - Y start shl 32 + Y end
13 - Display filled rectangle
In : rbx - X start & size
rcx - Y start & size
rdx - Color
Out: -
15 - Define and draw background
In : rbx - 1 Draw background
rbx - 2 Give background data
rcx - Pointer to background image (RRGGBB)
rdx - Destination
rex - Amount of bytes to copy
rbx - 3 Give background size
rcx - X size
rdx - Y size
Out: -
17 - Get pressed button info
In : -
Out: rax - 0 Request success
rbx - Button ID
rax - 1 No button in buffer for requestor
23 - Wait for event with timeout
In : rbx - Delay in 1/100s
Out: rax - Bitfield of event(s)
See also system call 123
26 - Get general system info
In : rbx 1 - General data
2 - Window stack
3 - Boot info base
4 - Paging table use
rcx - Pointer to return area
rdx - Bytes to return
Out: Returns data to [rcx]
35 - Get pixel of screen
In : rbx - 1 screen related
rcx - X
rdx - Y
Out: rax - pixel
37 - Get mouse data
In : rbx - 0 Mouse coordinates, screen relative
Out: rax - X shl 32 + Y
In : rbx - 1 Mouse coordinates, window relative
Out: rax - X shl 32 + Y
In : rbx - 2 Mouse buttons state
Out: rax - State
In : rbx - 3 Scroll wheel change
Out: rax - Change
38 - Draw Line
In : rbx - X start
rcx - Y start
rdx - X end
rex - Y end
rfx - Color
Out: -
40 - Set bitfield for wanted events
In : rbx - Bitfield of events
Reported by default:
0 .. 0 0 0 0 0 1 1 1
| | | | | | | | |
| | | | | | | | --- 00 Window redraw
| | | | | | | ----- 01 Key press
| | | | | | ------- 02 Button press
| | | | | --------- 03 [unused]
| | | | ----------- 04 Background change
| | | ------------- 05 Mouse event
| | --------------- 06 IPC event
| ----------------- 07 Network data event
| 08+ [unused]
---------------------- 32+ IRQ events
Out: -
42 - Read data from IRQ
In : rbx - IRQ to read data from
Out: rax - 0 successful, 1 no data
rbx - bl data
rcx - Data count after read
44 - Define ports to read at IRQ
In : rbx - IRQ
rcx - Pointer to port list
Out: rax - 0 successful, 1 IRQ already in use
45 - Reserve/Free IRQ for data read
In : rbx - 0 Reserve
rcx - IRQ
Out: rax - 0 Successful, 1 IRQ already in use
46 - Reserve/Free port for direct read and write
Not implemenet yet, but required for application
for future compatibility.
In : rbx - 0 Reserve
rcx - Port
Out: rax - 0 Successful, 1 Port already in use
47 - Display number
In : rbx - bits 00-07 - 0 - rcx is number
- 1 - rcx is pointer
bits 08-15 - 0 - display decimal
- 1 - display hexadecimal
- 2 - display binary
bits 16-31 - number of digits to display
bits 32-63 - not used
rcx - Number or pointer
rdx - X shl 32 + Y
rsi - Color
Out: -
50 - Define freeform and transparent window
In : rbx - 0 Define reference area
rcx - Pointer to freeform and transparent area
Area size: ( window_size_x * window_size_y ) bytes
Entries in area:
0 - Pixel not used by application - 100% transparency
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -