I was trying to make a code, that when you're at the very end, it will ask you if you want to try again. If you press 'y', then it will jump back a 1000 lines, right at the beginning of the program.
Well obviously, it didn't work out, as I got the…
I tried to use interrupt 3bh/21h for change directory to the root and display it, but that doesn't work. I copy program to c:/folder and execute it.
.model tiny
ORG 100h
.DATA
root db "\",0
buf DB 64 dup('$')
.CODE
start:
mov ax,…
I am trying to write a code that read and write text file with interrupt 21h.
here is my code:
IDEAL
MODEL small
STACK 100h
DATASEG
filename db 'testfile.txt',0
filehandle dw ?
Message db 'Hello world!'
ErrorMsg db 'Error', 10, 13,'$'
CODESEG
proc…
I have this code in assembly language, and it only show me if a number is odd or even. I also want if a number is even to show the opposite of the number, and if is odd to show the number/2. Can you help me with this ? Thanks. Sorry for my bad…
I have a task in which they give me the path to a file and I have to print all the attributes of that file...
So far all what I have found on the internet is about writing/reading from a file, but this does not help a bit.
EDIT: It has to be done in…
I am making the game "Connect Four". I have a square board which is 4x4. For each tile on the board I have to draw a disc (squre shaped) which has an x value and a y value. The problem is that I have to make 32 variables or a lot of procedures which…
DATA segment
msg1 db 0dh, 0ah, "ENTER A CHOICE $";
msg2 db 0dh, 0ah, "1.Addition $";
msg3 db 0dh, 0ah, "2.Subtraction $";
msg4 db 0dh, 0ah, "3.Exit $";
msg5 db 0dh, 0ah, "Enter the first number $";
msg6 db 0dh, 0ah, "Enter…