Questions tagged [tasm]

Turbo Assembler is an x86 assembler by Borland

Turbo Assembler is an x86 assembler by Borland.

833 questions
3
votes
1 answer

x86 sub instruction opcode confusion

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…
Codor
  • 17,447
  • 9
  • 29
  • 56
3
votes
1 answer

How can I eliminate the spaces and punctuation in a string with an assembly program in DOSBox?

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…
mariana
  • 31
  • 2
3
votes
1 answer

How can I find text mode page buffer in TASM?

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 …
Ahmed Crow
  • 101
  • 4
3
votes
1 answer

TASM addressing off by one

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…
CodenameLambda
  • 1,486
  • 11
  • 23
3
votes
1 answer

What happens when we divide a 16-bit number with a 8-bit 1?

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…
3
votes
1 answer

PUSH CS worked with TASM 1.01 but gives illegal indexing with TASM 5.4 -- How to fix?

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…
tonypdmtr
  • 3,037
  • 2
  • 17
  • 29
3
votes
1 answer

Assembly - Program works like expected, but when ran a second time, prints gibberish

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…
ori6151
  • 592
  • 5
  • 11
3
votes
1 answer

Tasm macros default value

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?
Vahag Chakhoyan
  • 873
  • 1
  • 10
  • 21
3
votes
1 answer

Save value in byte of var in assembly

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 …
Samu R
  • 334
  • 2
  • 14
3
votes
1 answer

How to fix "Expecting pointer type" and "symbol already different kind" in macros

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…
Mc Henry
  • 45
  • 3
3
votes
1 answer

Pop TWORD variable from FPU stack in TASM

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…
BEEET Hvcw
  • 49
  • 4
3
votes
2 answers

How do I print SVGA Info on the screen in tasm?

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…
sean
  • 65
  • 7
3
votes
3 answers

near jump changed to Short jump automatically

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…
Masoud Fard
  • 167
  • 6
3
votes
2 answers

Turbo Assembler Multiple Inputs Overlap

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…
eLjA
  • 31
  • 6
3
votes
1 answer

Set and reset keyboard Interrupt Service Routines in x86 real mode within DOS with Assembly

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…
MarkInTheDark
  • 244
  • 2
  • 15
1 2
3
55 56