News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

help in printing argv list

Started by sihotaamarpal, July 19, 2006, 10:15:58 AM

Previous topic - Next topic

sihotaamarpal

i fetch the argv list i want 2 print the argv[0] like in c
plz help me how i print the arglist mainly i want argv[0]


STACK_SEG SEGMENT PARA STACK 'STACK'
   DB 1024 DUP(' ')
STACK_SEG ENDS

DATA_SEG SEGMENT PARA 'DATA'
       
DATA_SEG ENDS

CODE_SEG SEGMENT PARA 'CODE'
   
    ASSUME SS:STACK_SEG,DS:DATA_SEG,CS:CODE_SEG
   
   
    MAIN PROC FAR
   
         PUSH BP
         MOV BP,SP
         PUSH SI
         MOV SI,WORD PTR[BP+8]    ;ARGV LIST
         
         
    PRINTARGV:
         
         
         
         
         POP SI
         POP BP
         
    EXIT:
         MOV AX,4C00H
         INT 21H
         
    MAIN ENDP
   
   
CODE_SEG ENDS
   
   END MAIN