All pastes #258662 Raw Edit

Stuff

public text v1 · immutable
#258662 ·published 2006-11-26 19:16 UTC
rendered paste body
mov bp,STDOUT

 
    mov ax, datap
    mov ds, ax

    mov si, 0x80      ; cmd parameters offset. 

    ; copy command line to our buffer: 
    xor cx, cx      ; zero cx register. 
    mov cx, [0x81] ; get command line size. 
    mov di,cx
    add di,cx
    inc di
    mov byte [di],'$'

    or cl,cl       ; cx = 0 ? 
    jz  no_param    ; then skip the copy. 

    inc si          ; start printing from second byte. 
      ;;;;;;;;My MOD OF THE SOUCE CODE;;;;;;;;it should open the file from the program parameter
    mov ax,0x3D  		;open the file
    mov dx,datap                 ;filename
    int 0x21  				
    jc erro
   
    mov bx,ax			;id of the opened file