亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? menuetos.htm

?? Menuet 操作系統(tǒng)源代碼。 非常難得的東西
?? HTM
?? 第 1 頁 / 共 3 頁
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0044)http://www.menuetos.org/www/eng/menuetos.htm -->
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<TABLE cellSpacing=0 cellPadding=0 width=700 align=center border=0>
  <TBODY>
  <TR>
    <TD width=700><PRE>
   
                   Programming with MenuetOS
                   =========================
   
   
1) Application programming
   
   1a) Structure of an application
   1b) Assembly example
   1c) Using uniform system colours
   1d) Free form window
   1e) Threads
   1f) Real-Time data
   
  
   
   
             1) APPLICATION PROGRAMMING FOR MENUET-OS
             ========================================
   
   
                1a) Structure of an application
                ===============================
   
   
Programming for Menuet is easy as you first learn the basic
structure of an application. At this point I assume you have some
experience in assembly language.
   
The MenuetOS API (Application Programming Interface) is a easy-to-learn
set of functions with practically no hierarchial accesses.
   
The operating of an application is based on events.
   
The application is notified by the OS with the event type and the application
acts accordingly. There are three event types an application is expected to
handle by default: window redraw, keypress and buttonpress.
   
Flow chart and structure of an application with default events:
   
  ;;;;;;;;;;;;;;;;;;;;;;;;;
  ;                       ;
  ;     HEADER DATA       ;
  ;                       ;
  ;;;;;;::;;;;;;;;;;;;;;;;;
   
START:
   
  call draw_window
   
  ;;;;;;;;;;;;;;;;::;;;;;;;
  ;                       ;
  ;   WAIT UNTIL EVENT    ;  &lt;-----------------------------------------------I
  ;                       ;                                                  I
  ;;;;;::;;;;;;;;;;;;;;;;;;                                                  I
            I                                                                I
  ;;;;;;;::;;;;;;;;;;;;;;;;                                                  I
  ;                       ;     redraw   -&gt;  call draw_window             -&gt; I
  ;    READ EVENT TYPE    ; -&gt;  key      -&gt;  read keypress    -&gt; process  -&gt; I
  ;                       ;     button   -&gt;  read buttonpress -&gt; process  -&gt; I
  ;;;;;::;;;;;;;;;;;;;;;;;;
   
   
draw_window:
   
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;                            ;
  ;  DRAW STATIC WINDOW PARTS  ;
  ;                            ;
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
  ret
   
   
DATA AREA:
   
  ;;;;;;;;;;;;;;;;;;;;;;;;
  ;                      ;
  ;     STATIC DATA      ;
  ;                      ;
  ;;;;;;;;;;;;;;;;;;;;;;;;
   
(end of image)

   
   

   
                     1b) Assembly example
                     ====================

   
   
A heavily commented assembly language realization of the above structure (1a).
   
Menuet system calls are executed with the 'int 0x40' command with function
number in register eax and other registers are used if necessary.
   
Details of all currently available system calls are at the section (1g)
System functions.
   
   
   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                                  ;
;      EXAMPLE APPLICATION                         ;
;                                                  ;
;      Compile with FASM for Menuet                ;
;                                                  ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
; The header
   
use32                                 ; compiler to use 32 bit instructions
   
               org    0x0             ; the base address of code, always 0x0
   
               db     'MENUET01'      ; 8 byte id for application
               dd     0x01            ; header version
               dd     START           ; start of execution
               dd     I_END           ; size of image
               dd     0x100000        ; Amount of memory to use
                                      ; You can access memory from 0x0 to
                                      ; value defined here. The relocation
                                      ; of code is done with selectors
                                      ; set by the OS.
               dd     0x7fff0         ; stack position in memory area
               dd     0x0             ; Parameter passing value
                                      ; if set to other than zero, possible
                                      ; parameters are transferred at start.
               dd     0x0             ; Reserved for icon
   

; The code area
   
   
START:                          ; start of execution
   
    call draw_window            ; draw the window
   
   
; After the window is drawn, it's practical to have the main loop.
; Events are distributed from here.
   
event_wait:
   
   
    mov  eax,10                 ; function 10 : wait until event
    int  0x40
                                ; event type is returned in eax
   
    cmp  eax,1                  ; Event redraw request ?
    je   red                    ; Expl.: there has been activity on screen and
                                ; parts of the applications has to be redrawn.
   
    cmp  eax,2                  ; Event key in buffer ?
    je   key                    ; Expl.: User has pressed a key while the
                                ; app is at the top of the window stack.
   
    cmp  eax,3                  ; Event button in buffer ?
    je   button                 ; Expl.: User has pressed one of the
                                ; applications buttons.
   
    jmp  event_wait
   
   
   
;  The next section reads the event and processes data.
   
   
  red:                          ; Redraw event handler
    call draw_window            ; We call the window_draw function and
    jmp  event_wait             ; jump back to event_wait
   
  key:                          ; Keypress event handler
    mov  eax,2                  ; The key is returned in ah. The key must be
    int  0x40                   ; read and cleared from the system queue.
    jmp  event_wait             ; Just read the key, ignore it and jump to
                                ; event_wait.
   
  button:                       ; Buttonpress event handler
    mov  eax,17                 ; The button number defined in window_draw
    int  0x40                   ; is returned to ah.
   
    cmp  ah,1                   ; button id=1 ?
    jne  noclose
    mov  eax,-1                 ; Function -1 : close this program
    int  0x40
  noclose:
   
    jmp  event_wait             ; This is for ignored events, useful
                                ; at development
   
   
;  *********************************************
;  ******  WINDOW DEFINITIONS AND DRAW  ********
;  *********************************************
;
;  The static window parts are drawn in this function. The window canvas can
;  be accessed later from any parts of this code (thread) for displaying
;  processes or recorded data, for example.
;
;  The static parts *must* be placed within the fn 12 , ebx = 1 and ebx = 2.
   
draw_window:
   
   
    mov  eax,12                    ; function 12:tell os about windowdraw
    mov  ebx,1                     ; 1, start of draw
    int  0x40
   
                                   ; DRAW WINDOW
    mov  eax,0                     ; function 0 : define and draw window
    mov  ebx,100*65536+300         ; [x start] *65536 + [x size]
    mov  ecx,100*65536+120         ; [y start] *65536 + [y size]
    mov  edx,0x02ffffff            ; color of work area RRGGBB
                                   ; 0x02000000 = window type 2
    mov  esi,0x808899ff            ; color of grab bar  RRGGBB
                                   ; 0x80000000 = color glide
    mov  edi,0x008899ff            ; color of frames RRGGBB
    int  0x40
   
                                   ; WINDOW LABEL
    mov  eax,4                     ; function 4 : write text to window
    mov  ebx,8*65536+8             ; [x start] *65536 + [y start]
    mov  ecx,0x00ddeeff            ; color of text RRGGBB
    mov  edx,labelt                ; pointer to text beginning
    mov  esi,labellen-labelt       ; text length
    int  0x40
   
                                   ; CLOSE BUTTON
    mov  eax,8                     ; function 8 : define and draw button
    mov  ebx,(300-19)*65536+12     ; [x start] *65536 + [x size]
    mov  ecx,5*65536+12            ; [y start] *65536 + [y size]
    mov  edx,1                     ; button id
    mov  esi,0x6677cc              ; button color RRGGBB
    int  0x40
   
   
    mov  ebx,25*65536+35           ; draw info text with function 4
    mov  ecx,0x224466
    mov  edx,text
    mov  esi,40
   newline:                         ; text from the DATA AREA
    mov  eax,4
    int  0x40
    add  ebx,10
    add  edx,40
    cmp  [edx],byte 'x'
    jne  newline
   
    mov  eax,12                    ; function 12:tell os about windowdraw
    mov  ebx,2                     ; 2, end of draw
    int  0x40
   
    ret
   
   
   
;  *********************************************
;  *************   DATA AREA   *****************
;  *********************************************
;
; Data can be freely mixed with code to any parts of the image.
; Only the header information is required at the beginning of the image.
   
   
text:       db  'THIS IS AN EXAMPLE PROGRAM YOU COULD    '
            db  'USE, A:\EXAMPLE.ASM  CODE IS COMMENTED  '
            db  'AND CLEAR. SYSTEM FUNCTIONS ARE IN FILE '
            db  'SYSFUNCS.TXT AND COMMANDS IN CMD.TXT    '
            db  'x &lt;- END MARKER, DONT DELETE            '
   
labelt:     db  'EXAMPLE APPLICATION'
labellen:
   
   
I_END:

   
; The area after I_END is free for use as the application memory, 
; just avoid the stack.
;
; Application memory structure, according to the used header, 1 Mb.
;
; 0x00000   - Start of compiled image
; I_END     - End of compiled image           
;
;           + Free for use in the application
;
; 0x7ff00   - Start of stack area
; 0x7fff0   - End of stack area                 - defined in the header
;
;           + Free for use in the application
;
; 0xFFFFF   - End of freely useable memory      - defined in the header
;
; All of the the areas can be modified within the application with a
; direct reference.
; For example, mov [0x80000],byte 1 moves a byte above the stack area.

   
Menuet's application structure is not specifically reserved for
asm programming, the header can be produced with practically
any other language. However, the overall application programming
design is intended for easy 32 bit asm programming. The GUI is
extremely easy to handle with especially asm language.

   
   
   
   
               1c) Using uniform system colours
               ================================

   
   
While previous example concentrated on creating a basic application,
in this section more attention is paid on the outlook of the window.
   
You can use uniform desktop colors defined by a colour setup application.
   
New fuction in this example is get_system_colours.
   
   
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                                  ;
;      UNIFORM SYSTEM COLOURS EXAMPLE              ;
;                                                  ;
;      Compile with FASM for Menuet                ;
;                                                  ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   
; The header
   
use32                                 ; compiler to use 32 bit instructions
   
               org    0x0             ; the base address of code, always 0x0
   
               db     'MENUET01'      ; 8 byte id for application
               dd     0x01            ; header version
               dd     START           ; start of execution
               dd     I_END           ; size of image
               dd     0x100000        ; Amount of memory to use
                                      ; You can access memory from 0x0 to
                                      ; value defined here. The relocatn of
                                      ; of the code is done with selectors
                                      ; set by the OS.
               dd     0x7fff0         ; stack position in memory area
               dd     0x0             ; Parameter passing value
                                      ; if set to other than zero, possible
                                      ; parameters are transferred at start.
               dd     0x0             ; Reserved for icon
   
   
   
; The code area
   
   
window_size_X  equ  300
window_size_Y  equ  150
   
   
START:                          ; start of execution
   
    call draw_window            ; draw the window
   
   
; After the window is drawn, it's practical to have the main loop.
; Events are distributed from here.
   
event_wait:
   
   
    mov  eax,10                 ; function 10 : wait until event
    int  0x40
                                ; event type is returned in eax
   
    cmp  eax,1                  ; Event redraw request ?
    je   red                    ; Expl.: there has been activity on screen and
                                ; parts of the applications has to be redrawn.
   
    cmp  eax,2                  ; Event key in buffer ?
    je   key                    ; Expl.: User has pressed a key while the
                                ; app is at the top of the window stack.
   
    cmp  eax,3                  ; Event button in buffer ?
    je   button                 ; Expl.: User has pressed one of the
                                ; applications buttons.
   
    jmp  event_wait
   
   
   
;  The next section reads the event and processes data.
   
   
  red:                          ; Redraw event handler
    call draw_window            ; We call the window_draw function and
    jmp  event_wait             ; jump back to event_wait
   
  key:                          ; Keypress event handler
    mov  eax,2                  ; The key is returned in ah. The key must be
    int  0x40                   ; read and cleared from the system queue.
    jmp  event_wait             ; Just read the key, ignore it and jump to
                                ; event_wait.
   
  button:                       ; Buttonpress event handler
    mov  eax,17                 ; The button number defined in window_draw
    int  0x40                   ; is returned to ah.
   
    cmp  ah,1                   ; button id=1 ?
    jne  noclose
    mov  eax,-1                 ; Function -1 : close this program
    int  0x40
  noclose:
   
    jmp  event_wait             ; This is for ignored events, useful
                                ; at development
   
   
get_system_colours:
   
    pusha
   
    mov  eax,48                       ; fn 48 system colours
    mov  ebx,3                        ; subfn 3 : get
    mov  ecx,app_colours              ; pointer to return area
    mov  edx,10*4                     ; number of bytes to return
    int  0x40
   
    popa
   
    ret
   
   
app_colours:                          ; SYSTEM COLOURS TABLE
   
w_frames             dd 0x0           ; - frames
w_grab               dd 0x0           ; - GRAB AREA
w_grab_button        dd 0x0           ;   grab area button
w_grab_button_text   dd 0x0           ;   grab area button text
w_grab_text          dd 0x0           ;   grab area text
w_work               dd 0x0           ; - WORK AREA
w_work_button        dd 0x0           ;   work area button
w_work_button_text   dd 0x0           ;   work area button text
w_work_text          dd 0x0           ;   work area text
w_work_graph         dd 0x0           ;   work area graphics
   
   
   
;  *********************************************
;  ******  WINDOW DEFINITIONS AND DRAW  ********
;  *********************************************
;
;  The static window parts are drawn in this function. The window canvas can
;  be accessed later from any parts of this code (thread) for displaying
;  processed or recorded data, for example.
;
;  The static parts *must* be placed within the fn 12 , ebx = 1 and ebx = 2.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久嫩草精品久久久精品| 久久久影院官网| 国产精品综合视频| 一区二区三区欧美| 久久久影视传媒| 欧美久久高跟鞋激| 成人少妇影院yyyy| www.激情成人| 麻豆91在线观看| 亚洲女人的天堂| 久久精品亚洲乱码伦伦中文| 在线免费亚洲电影| 高清不卡在线观看| 美女视频免费一区| 亚洲国产成人高清精品| 中文字幕制服丝袜成人av | 天天影视涩香欲综合网| 国产精品美女久久久久久久 | 91免费视频网址| 国产一区二区视频在线播放| 日韩av在线发布| 亚洲一区电影777| 亚洲欧美综合色| 国产清纯白嫩初高生在线观看91 | 偷窥少妇高潮呻吟av久久免费| 国产精品久线观看视频| 久久天天做天天爱综合色| 欧美日韩国产首页| 色哟哟国产精品免费观看| 国产伦精品一区二区三区免费迷 | 91精品一区二区三区在线观看| 91免费在线播放| 成人高清在线视频| 国产精品99久久久久| 六月丁香婷婷色狠狠久久| 亚洲国产综合在线| 亚洲精品亚洲人成人网| 亚洲欧洲在线观看av| 欧美大胆人体bbbb| 欧美一区午夜视频在线观看 | 日韩午夜三级在线| 91精品国产一区二区| 精品视频在线视频| 欧美日韩一区中文字幕| 色综合久久88色综合天天6| 成人免费视频视频在线观看免费| 精品一区免费av| 经典三级在线一区| 国精产品一区一区三区mba视频| 美女国产一区二区三区| 麻豆91在线播放免费| 久久不见久久见免费视频7| 美女在线视频一区| 九一九一国产精品| 国产一区二区调教| 成人小视频免费在线观看| 成人高清视频在线观看| 91在线云播放| 欧美三日本三级三级在线播放| 欧美亚洲日本国产| 欧美区在线观看| 欧美一区二区三区视频在线| 欧美大片日本大片免费观看| 久久久av毛片精品| 国产精品电影一区二区| 亚洲一级二级在线| 美女网站色91| 粉嫩蜜臀av国产精品网站| 99精品国产视频| 欧美色综合网站| 日韩欧美激情一区| 中文字幕av免费专区久久| 亚洲欧洲综合另类| 日韩av一区二| 国产高清成人在线| av在线综合网| 欧美精品第1页| 26uuu久久天堂性欧美| 中文字幕一区视频| 婷婷六月综合亚洲| 国产一区二区免费视频| 91论坛在线播放| 日韩精品一区二区三区在线| 国产精品毛片无遮挡高清| 亚洲综合丝袜美腿| 精品一区二区三区免费观看| 99久久99久久免费精品蜜臀| 欧美精品乱码久久久久久| 久久伊人蜜桃av一区二区| 亚洲欧美日韩一区| 另类成人小视频在线| 成人av电影免费观看| 欧美一区二区三区小说| 亚洲婷婷在线视频| 精品午夜久久福利影院| 在线亚洲人成电影网站色www| 日韩一级成人av| 亚洲人成网站色在线观看| 久久精品999| 91传媒视频在线播放| 久久精品无码一区二区三区| 亚洲电影在线免费观看| 粉嫩aⅴ一区二区三区四区| 91麻豆精品国产91久久久使用方法| 国产三区在线成人av| 视频精品一区二区| 91麻豆国产精品久久| 久久久久久电影| 日本aⅴ亚洲精品中文乱码| 91视频在线看| 国产欧美日本一区二区三区| 免费在线观看一区| 欧美无砖专区一中文字| **性色生活片久久毛片| 国产伦精品一区二区三区免费迷| 欧美日韩一卡二卡三卡 | 亚洲午夜电影网| 99视频精品免费视频| 久久人人超碰精品| 蜜桃精品在线观看| 欧美高清一级片在线| 一区二区三区四区视频精品免费| 国产99久久久国产精品免费看| 日韩一区二区在线观看视频| 午夜电影一区二区三区| 欧美在线999| 亚洲精品中文字幕乱码三区| 波多野结衣中文一区| 欧美国产激情二区三区| 国产福利91精品一区二区三区| 日韩视频一区在线观看| 日本亚洲免费观看| 欧美日韩不卡一区二区| 亚洲一区二区三区在线播放| 色综合久久精品| 亚洲欧美一区二区三区国产精品| 成人精品视频一区二区三区尤物| 久久久美女艺术照精彩视频福利播放| 久久精品国产亚洲高清剧情介绍| 欧美一区二区视频免费观看| 秋霞午夜鲁丝一区二区老狼| 欧美久久久久久久久中文字幕| 午夜久久久久久久久| 欧美日韩一区成人| 视频一区欧美精品| 欧美男女性生活在线直播观看| 亚洲成av人**亚洲成av**| 欧美日韩久久久久久| 日韩精品乱码免费| 日韩欧美高清一区| 精油按摩中文字幕久久| 精品国产百合女同互慰| 国产凹凸在线观看一区二区| 亚洲国产精品传媒在线观看| 福利视频网站一区二区三区| 中文字幕在线免费不卡| 色综合中文字幕国产 | 国产成人av电影| 中文字幕第一页久久| 97精品久久久久中文字幕| 亚洲乱码中文字幕| 欧美视频在线一区| 青青草国产成人99久久| 欧美xingq一区二区| 国产成人亚洲精品青草天美| 国产精品欧美久久久久无广告| 成人av电影在线| 亚洲国产人成综合网站| 日韩欧美国产系列| 丰满少妇在线播放bd日韩电影| 亚洲人午夜精品天堂一二香蕉| 欧美日韩在线播放三区四区| 久久99精品国产91久久来源| 国产视频亚洲色图| 一本大道av伊人久久综合| 日韩综合在线视频| 欧美韩国日本一区| 欧美三级三级三级爽爽爽| 激情小说欧美图片| 中文字幕视频一区二区三区久| 欧美日韩1区2区| 国产精品一色哟哟哟| 亚洲精品第1页| 精品国产一区二区三区久久影院| 成人avav影音| 蜜臀精品一区二区三区在线观看| 中文在线资源观看网站视频免费不卡| 在线免费观看不卡av| 黄一区二区三区| 一区二区欧美在线观看| 久久久亚洲午夜电影| 欧美日韩视频专区在线播放| 国产乱码精品一区二区三区忘忧草| 樱花草国产18久久久久| 精品日韩成人av| 91成人网在线| 成人性色生活片免费看爆迷你毛片| 日韩精品国产精品| 亚洲人成网站精品片在线观看| 日韩视频在线你懂得|