Writing to a file in assembler
问题 I'm tasked with creating a program that would write some string to a file. So far, I came up with this: org 100h mov dx, text mov bx, filename mov cx, 5 mov ah, 40h int 21h mov ax, 4c00h int 21h text db "Adam$" filename db "name.txt",0 but it doesn't do anything. I'm using nasm and dosbox. 回答1: You have to create the file first (or open it if it already exists), then write the string, and finally close the file. Next code is MASM and made with EMU8086, I post it because it may help you to