kolibrios-gitea/programs/other/outdated/cmd/trunk/examples/PARAM.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

55 lines
1.0 KiB
NASM
Raw 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.

use32
org 0x0
db 'MENUET01'
dd 0x01
dd START
dd I_END
dd 0x100000
dd 0x7fff0
dd I_PARAM ; 㪠§ â¥«ì ­  ¯ à ¬¥âàë
include "CMDIPC.INC" ; <20>®¤ª«îç¨âì ä ©« CMDIPC.INC
START:
call initipc ; ¨­¨æ¨ «¨§¨à®¢ âì ¤«ï à ¡®âë á CMD
mov eax,47 ; ¢ë¢¥á⨠ᮮ¡é¥­¨¥
mov ebx,mess
call print
call eol ; ¯à®¯ãáâ¨âì áâபã
call eol
cmp [I_PARAM],byte 0 ; ¯à®¢¥à¨âì, ¥áâì «¨ ¯ à ¬¥âàë
jz noparam
mov eax,43
mov ebx,mess1
call print
call eol
mov eax,30 ; ¢ë¢¥á⨠¯ à ¬¥âàë
mov ebx,I_PARAM
call print
jmp end1 ; ¯¥à¥å®¤ ¢ ª®­¥æ ¯à®£à ¬¬ë
noparam:
mov eax,40 ; ¢ë¢¥á⨠ᮮ¡é¥­¨¥ ® ⮬, çâ® ­¥â ¯ à ¬¥â஢
mov ebx,mess2
call print
end1:
jmp endipc ; § ¢¥àè¨âì ¯à®£à ¬¬ã
mess db 'PARAM.ASM - Test params in IPC programs for CMD'
mess1 db 'This program was started with this params: '
mess2 db 'This program was started without params!'
I_PARAM db 0
I_END: