; by: Svjatoslav Agejenko ; homepage: svjatoslav.eu ; email: svjatoslav@svjatoslav.eu ; on: 2002.10.07 ; compile with FASM ( Flat ASseMbler ) by Tomasz Grysztar org 100h cmaddr = 53h mov ah, 3ch ; create file sub cx, cx mov dx, name int 21h mov [hand], ax mov al, cmaddr out 70h, al in al, 71h mov di, eof sub cx, cx mov cl, al mov dl, cmaddr l1: inc dl mov al, dl out 70h, al in al, 71h stosb loop l1 mov cx, di ; write to file sub cx, line mov ah, 40h mov bx, [hand] mov dx, line int 21h mov ah, 3eh ; close file mov bx, [hand] int 21h ret error: mov ah, 9 mov dx, err int 21h ret name db 'setenv.bat', 0 hand dw 0 err db 'error occured$' line db 'SET CMOSE=' eof: