update examples

git-svn-id: svn://kolibrios.org@6890 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2017-04-22 08:45:27 +00:00
parent 11fcf4b4ff
commit e9922b1f71
2 changed files with 36 additions and 18 deletions

View File

@ -10,16 +10,16 @@ format binary as "" ; Binary file format without extension
use32 ; Tell compiler to use 32 bit instructions
org 0x0 ; the base address of code, always 0x0
org 0 ; the base address of code, always 0x0
; The header
db 'MENUET01'
dd 0x01
dd 1
dd START
dd I_END
dd 0x100000
dd 0x7fff0
dd MEM
dd STACKTOP
dd 0, 0
; The code area
@ -132,6 +132,11 @@ text db "It looks like you have just compiled "
title db "Example application", 0
I_END:
rb 4096
align 16
STACKTOP:
MEM:
; The area after I_END is free for use as the application memory,
; just avoid the stack.
@ -143,13 +148,13 @@ I_END:
;
; + Free for use in the application
;
; 0x7ff00 - Start of stack area
; 0x7fff0 - End of stack area - defined in the header
; STACKTOP - Start of stack area - defined in the header
; STACKTOP-4096 - End of stack area
;
; + Free for use in the application
;
; 0xFFFFF - End of freely useable memory - defined in the header
; MEM - 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.
; For example, mov [STACKTOP-1],byte 1 moves a byte above the stack area.

View File

@ -26,16 +26,16 @@
;---------------------------------------------------------------------
use32 ; ¢ª«îç¨âì 32-¡¨â­ë© ०¨¬  áᥬ¡«¥à 
org 0x0 ;  ¤à¥á æ¨ï á ­ã«ï
org 0 ;  ¤à¥á æ¨ï á ­ã«ï
db 'MENUET01' ; 8-¡ ©â­ë© ¨¤¥­â¨ä¨ª â®à MenuetOS
dd 0x01 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd 1 ; ¢¥àá¨ï § £®«®¢ª  (¢á¥£¤  1)
dd START ;  ¤à¥á ¯¥à¢®© ª®¬ ­¤ë
dd I_END ; à §¬¥à ¯à®£à ¬¬ë
dd 0x1000 ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd 0x1000 ;  ¤à¥á ¢¥à設ë áâíª 
dd 0x0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢
dd 0x0 ; § à¥§¥à¢¨à®¢ ­®
dd MEM ; ª®«¨ç¥á⢮ ¯ ¬ïâ¨
dd STACKTOP ;  ¤à¥á ¢¥à設ë áâíª 
dd 0 ;  ¤à¥á ¡ãä¥à  ¤«ï ¯ à ¬¥â஢
dd 0 ; § à¥§¥à¢¨à®¢ ­®
include "macros.inc" ; ¬ ªà®áë ®¡«¥£ç îâ ¦¨§­ì  áᥬ¡«¥à騪®¢!
@ -127,7 +127,7 @@ draw_window:
; ¢ë¢®¤ ⥪á⮢®© áâப¨
mov ecx, [sc.work_text] ; 梥â ä®­ 
or ecx, 0x90000000 ; ¨ ⨯ áâப¨
mcall 4, <10, 20>, 0x90000000, message
mcall 4, <10, 20>, , message
mcall 12, 2 ; äã­ªæ¨ï 12.2, § ª®­ç¨«¨ à¨á®¢ âì
@ -153,3 +153,16 @@ title db '
;---------------------------------------------------------------------
I_END: ; ¬¥âª  ª®­æ  ¯à®£à ¬¬ë
rb 4096 ; ¯ ¬ïâì ¤«ï á⥪ 
align 16
STACKTOP: ; ¬¥âª  ¢¥à設ë á⥪  (¯à¨ § ¯®«­¥­¨¨ á⥪
; à áâ¥â ¢ áâ®à®­ã 㬥­ì襭¨ï  ¤à¥á®¢, ¯®â®¬ã
; ¯ ¬ïâì ¤«ï ­¥£® ¢ ª®¤¥ ¯à®£à ¬¬ë ¢áâà¥ç ¥âáï
; à ­ìè¥ ç¥¬ ¥£® ¢¥à設 )
MEM: ; ¬¥âª  㪠§ë¢ îé ï ­  ª®­¥æ ¯à®£à ¬¬ë ¯«îá
; à §¬¥à ¨á¯®«ì§ã¥¬®© ¥î ®¯¥à â¨¢­®© ¯ ¬ïâ¨
; €¤à¥á ¬¥âª¨ MEM ¢á¥£¤  ¤®«¦¥­ ¡ëâì ¡®«ìè¥ ç¥¬  ¤à¥á ¬¥âª¨ I_END.
; Œ¥âª  STACKTOP ¤®«¦­  à á¯®« £ ¥âáï ¯®á«¥ ¬¥âª¨ I_END ¨ ¯¥à¥¤ ¬¥âª®©
; MEM. STACKTOP ¬®¦¥â ­ å®¤¨âáï ¨ ¯¥à¥¤ I_END, ­® íâ® ­¥ ¯à ¢¨«ì­®.
; ˆ¬¥­  ¬¥â®ª ¬®£ãâ ¡ëâì á «î¡ë¬¨ ­ §¢ ­¨ï¬¨, £« ¢­®¥ ᮡ«î¤ âì
; ¯à ¢¨«ì­ë© ¯®à冷ª ¨å à á¯®«®¦¥­¨ï.