Playing around a bit with Turbo Assembler and Turbo Debugger, I was surprised about opcodes. More precisely, I have some assembled binary in which Turbo Debugger disassembles the word
29 C3
correctly to sub bx, ax. However, Turbo Assembler…
I tried, but it gives me an error:
an unexpected end of file encountered
;Program p02.asm
.MODEL small
.stack 100h
.data
source db "STRING, WITH. PUNCTUATION : AND * SPACES!$"
aux db " "
.code
mov…
I'm trying to send some characters to page 1 of text mode by its memory address, but I find no suitable result, I calculated the page 1 address like this "0B800h + 1000h = 0C800h".
This is my code:
IDEAL
MODEL small
STACK …
I'm currently implementing Snake for university, and we have to use TASM for that.
My main game data is laid out like this (using C syntax):
struct GameLine {
uint8_t direction_bits[10]; // 2 bits per entry, the first entry is invalid since…
As far as I have heard, if we use div instruction with a 8-bit number then the quotient is a 8-bit number stored in AL and the remainder is again a 8-bit number stored in AH
But what if we divide a 16-bit number by 1?
I ended up having my…
I have legacy (DOS era) code that used:
push cs
pop ds
and that assembled fine with TASM v1.01
Trying to assemble with TASM v5.4 I get 'illegal indexing mode' error for push cs instruction.
How can I fix that?
(Searching for [tasm] illegal indexing…
I'm making a program in TASM assembly (i honestly have no idea if it's 16 bit, x86, 64 bit maybe 8086?. I'm using TASM inside DOSBox for assembling, linking, and testing.
The user inputs characters until the user presses Enter key. then echos what…
In turbo assembler i have a macro
subs macro x,y
mov ax,x
sub ax,y
endm
how can I give to y a default value, equal to 1, so I can write
subs bx
and ax becomes equal to bx - 1?
I want to make a program that takes 10 characters from the user and saves them in a vector DATA, but I get the error
can't add relative quantities
in mov byte ptr DATA[pos], al when I try to store the value.
How to solve this error?
.model small
…
I'm not sure what I'm doing wrong.
I've tried adding the prefix @@ in the macros as well declaring local @@label in the macros, it didn't work.
I've also checked this site link
as well that was mentioned in the previous problems... It didn't…
I am writing a program in Turbo Assembler which gets a number from console, calculate another number based on it, and prints result onto console.
I have done conversion from string to floating-point number and back through subprograms (I do not…
I am complete beginner to assembly, and graphics, any help would be appreciated. I got the svga info, but when i print it, it won't print anything. If anyone can explain why that would be great. Here is the code. If there is anymore explanations…
I need near jump(E9 XX XX) and specify that in code, but TASM (and MASM) changed that to Short(EB XX NOP) after assemble.
MAIN SEGMENT BYTE
ASSUME CS:MAIN,DS:MAIN,SS:NOTHING
ORG 100H
HOST:
jmp NEAR PTR VIRUS_START
db ’VI’
mov ah,4CH
mov…
I'm new to assembly language and I am having trouble with my code. At first I tried 1 input and then 1 output and it works just fine. But when I try 2 inputs. That's when the problem shows up. When it asks "Gender" input 1 and output 1 seems to…
How do you properly set, and then reset, the keyboard ISR in DOS? (x86 assembly, real mode, 16 bit, with TASM)
I have the following assembly code which sets up my ISR for the keyboard. All it is supposed to do is print out a sentence each time a…