Hello everyone, say if I'm to have a "text.txt" file that has something like "Hello,world". Can you show me a program to read this file and then print it out? Thank you! Written in MASM x86 assembly language please!
The following code reads the file with the name
.MODEL SMALL .STACK 100H .DATA FILENAME DB 'text.txt',0 HANDLE DW ? MSG DB 'Hello,World' BUFFER DB 25 DUP(?) COUNT DB 20 ;displaying 20 bytes of information. change according to your requirement .CODE MAIN PROC MOV AX,@DATA MOV DS,AX ;***************OPENING AN EXISTING FILE***************; MOV AH,3DH MOV DX,OFFSET(FILENAME) MOV AL,1 ; 1 MEAN FOR WRITING PURPOSE INT 21H MOV HANDLE,AX MOV AH,40H MOV BX,HANDLE MOV CX,25 MOV DX, OFFSET(MSG) INT 21H MOV AH,3EH MOV DX,HANDLE INT 21H ;***************OPENING A FILE FOR READING***************; MOV AH,3DH MOV DX,OFFSET(FNAME) MOV AL,0 ; 1 MEAN FOR WRITING PURPOSE INT 21H MOV HANDLE,AX MOV AH,3FH MOV BX,HANDLE MOV DX,OFFSET(BUFFER) MOV CX,10 INT 21H ;***************DISPLAYING 10 BYTES***************; MOV SI,OFFSET(BUFFER) L1: MOV AH,2 MOV DL,[SI] INT 21H INC SI DEC COUNT JNZ L1 ;***************CLOSING A FILE***************; ;MOV AH,3EH ;MOV DX,HANDLE ;INT 21H MOV AH,4CH INT 21H MAIN ENDP END MAIN
Hello everyone, say if I'm to have a "text.txt" file that has something like "Hello,world". Can...
Assembly language.
Can u pls send me a copyable code please. If you can run
it.
X86. Asm.
Subject: Assembly language If you know x86 asm then only answer it Use x86 asm version send me a written code please send me with out put please send me a copyable code i promise to give you thumbs up, question: Implement a simple 4 functios calculator for 3 digits entry. The user will enter 2 digits for the first...
Hello, I have a question about C Program. I have finished the code. And it can debug successfully. However, when I run it for more times, it will suddenly say there is one error which says that can not open the file and give a "Link" word beside. Can you tell me why it will happen to be it and what to do to avoid the problem. Thank you!
Hello, I'm having trouble solving this problem. I have tried
some other codes and they seem like they work but I am not sure how
the files are made or how this code works. It will be helpful that
you show me how. Thank you so much. (In C++)
Write a program find that searches all files specified on the command line and prints out all lines containing a keyword. For example, if you call find Tim report.txt address.txt homework.cpp...
Hello everyone! I am working on my assignment for C++ and I'm having a bit of trouble on the value producing functions, I am creating a program wherein I have to input a value and I need to create a function called square value where in it will square the value I have input. I cannot seem to figure out this part. Here is the code that I have so far, and thank you for any help. I greatly appreciate...
Hello everyone
I have a question for circuit II course and I need a good
expert who can helps me to solve that problem.
Thank you so much
Cs 2. 3 2 IS
Python question When reading and writing into a file. Say i want to read in input using a file called input.txt and then do something. Then i want to output the results to an additional file called output.txt. i have seen ouput.out or results.out used and not .txt. What is the difference? When would you use .out and not .txt? thank you
(Mobile-Android Studio) Hello. Thank you for coming to help me:) I am using the Andriod studio on mac. and using Java code to develop. and Please start with basic activity with constraints layout (not empty). (audio file is not given, let's say there any audio file). I just would like to see the codes how it works. Thank you very much. I would like to know how to write a program that includes two buttons called plays Play and Stop....
Hello, I'm going to explain this question in front of my class, so can please write out the complete explanation for the question, please. Also if you use the TI calculator for this question can you say what you used to get to the answer. Thanks so much have a great day Joy The question. 1. According to one pollster, 50% of people are afraid of flying. Suppose that a sample of a size of 27 is drawn. Find the...
Experiment with the terminal and C programming I want you to be able to setup a folder, change to a folder, create a new file with the editor (windows version is fine), rename files, delete files, and change permissions. How to create a compiled program Create your source code; lets say it is named test.c Compile it using: gcc test.c –o test Change the permissions to execute for everyone (755) Run it by: ./test Create two programs The first one...
Written in C++ language Write a program that keeps track of a telephone directory. The program should create a structure, Person, with the following data: struct Person { string firstName; string lastName; string phoneNumber; }; The program should then create a vector of Person structs, called directory. Your program should have functions to: - Read the vector data from a data file “telephoneData.txt” into the vector directory. - Print the details of all Persons in the vector. You may use...