Hi, im coding a program that reads a string from input and converts it to a valid DOS address, then opens the file if it exists and print its content to the screen, the problem is that im using TASM to compile the program and my buffer 1024 bytes long, as for TASM, the string is terminated where a dollar sign ("$") is found, so what if im reading a file that contains dollar signs ? then i wouldnt be able to print it onto the screen, can anybody help ? (i have tried printing one character at a time to the console and it worked, but i wanna know how i can use bigged buffers)
Posted on 2006-03-25 22:16:36 by XCHG
Humm, the $ termianted strings is because of the int21 call you use, right?

Iirc you can use the int21 "write to file" instead, to write to standard output - then you can write anything, since it doesn't depend on terminators, but requires you to pass size.
Posted on 2006-03-26 04:37:20 by f0dder
the AH = 40h / INT 21h would write to a file i think, but the BX has got to be filled with the file handle, what do i set it to write to the STD ?
Posted on 2006-03-28 22:31:30 by XCHG
Iirc file handles 0/1/2 would be stdin,stdout,stderr - perhaps with stdin/stdout swapped. But it's been ages since I did any DOS coding :)

If you're limited to DOS not limited to 16bit, you might want to try out some 32bit DOS extender with PE executable support, btw - that's how I did DOS programming in the final years before moving to windows :)
Posted on 2006-03-29 03:27:17 by f0dder
I haven't fiddled around with this yet but thanks anyway. i'll try it
Posted on 2006-03-30 03:23:04 by XCHG