hi ,
iam new asm and i heave problem exercise
the exercise:
1-Make a data file named "file.txt" with 10 integers, each on a separate line and each between 0 and 160.

2. Write an assembly program which does the following:
a. looks for the above file in your working directory.
b. if file not found it:
(i) displays error message
(ii) then exits.
c. if file is found then it:
(i) first reads all the numbers
(ii) then prints how many there

how can i read integer number from file.txt?then print it?

Recommended Answers

All 4 Replies

Do you want us to guess which assembler / processor / operating system you're dealing with?

it is x86 assembly, and for windows
and we write assembly by tasm

Correct me if I'm wrong, but isn't tasm a DOS assembler, and as such restricted to the archaic DOS interrupts for doing things?

yes,that's right
and thanks for your help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.