kolibrios-gitea/programs/other/outdated/cmd/trunk/examples/HELLO.ASM
Kirill Lipatov (Leency) a385ed42e0 move notify.inc into notify3 folder, move cmd to outdated folder
git-svn-id: svn://kolibrios.org@7785 a494cfbc-eb01-0410-851d-a64ba20cac60
2020-04-13 23:21:48 +00:00

71 lines
1.5 KiB
NASM
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

; Hello, World! - Programm example for CMD shell
; Compile with FASM for Menuet
;
; You must run this program from CMD shell only
;
use32
org 0x0
db 'MENUET01'
dd 0x01
dd START
dd I_END
dd 0x100000
dd 0x7fff0
dd 0x0
dd 0x0
include "CMDIPC.INC" ; <20>®¤ª«îç¨âì ä ©« CMDIPC.INC
START:
call initipc ; ¨­¨æ¨ «¨§¨à®¢ âì ¤«ï à ¡®âë á CMD
mov eax,26 ; „«¨­  áâப¨
mov ebx,hello_text ; “ª § â¥«ì ­  áâபã
call print ; ‚뢥á⨠áâபã
again:
call getkey ; Ž¦¨¤ âì ­ ¦ â¨ï ª« ¢¨è¨ ¨ áç¨â âì ¥¥ ¢ key
cmp byte [key],'Y' ; ’ã⠯ணࠬ¬  ¯à®¢¥àï¥â, ­ ¦ â  «¨ ­ã¦­. ª« ¢¨è 
je goodday
cmp byte [key],'y'
je goodday
cmp byte [key],'N'
je goodmorning
cmp byte [key],'n'
je goodmorning
jmp again ; …᫨ ­ã¦­. ª« ¢¨è  ­¥ ­ ¦ â , â® áç¨â âì ª« ¢¨èã
; § ­®¢®
goodday: ; ‚뢥á⨠¯à¨¢¥âá⢨¥ Good Day, World!
call eol ; <20>யãáâ¨âì áâபã
mov eax,16
mov ebx,text4
call print
call eol ; <20>யãáâ¨âì áâபã
jmp endipc ; ‡ ¢¥àè¨âì ¯à®£à ¬¬ã
goodmorning: ; ‚뢥á⨠¯à¨¢¥âá⢨¥ Good Morning, World!
call eol
mov eax,20
mov ebx,text5
call print
call eol
jmp endipc ; ‡ ¢¥àé¨âì ¯à®£à ¬¬ã
hello_text db 'Is it after 12 noon? [Y\N]?'
text4 db 'Good day, World!'
text5 db 'Good morning, World!'
I_END: