ASSEMBLY LANGUAGE PROGRAMMING
Wednesday, January 28, 2009
8086 Programming: TITLE WRITE TO A FILE .MODEL SMALL .STACK 100H .DATA FNAME DB 'D:\PARU.TXT$',0 FPOINTER DW ? MSG1 DB 'ERROR$' MSG2 DB 'DONE$' MSG DB ' i want to fuck you now$' LEN DW $-MSG .CODE MAIN PROC MOV AX,@DATA MOV DS,AX LEA DX,FNAME MOV AH,3dH MOV AL,2 INT 21H MOV FPOINTER,AX MOV BX,FPOINTER LEA DX,MSG MOV CX,LEN MOV AH,40H INT 21H JC ERROR LEA DX,MSG2 MOV AH,9H INT 21H JMP EXIT ERROR: MOV DX,OFFSET MSG1 MOV AH,9H INT 21H EXIT: MOV AH,4CH INT 21H MAIN ENDP END MAIN
0 comments:
Post a Comment