Questions tagged [tasm]

Turbo Assembler is an x86 assembler by Borland

Turbo Assembler is an x86 assembler by Borland.

833 questions
42
votes
10 answers

How many ways to set a register to zero?

I'm curious how many ways are there to set a register to zero in x86 assembly. Using one instruction. Someone told me that he managed to find at least 10 ways to do it. The ones I can think of are: xor ax,ax mov ax, 0 and ax, 0
user173973
26
votes
3 answers

How to generate a nasm compilable assembly code from c source code on Linux?

Test platform is 32 bit Linux. Basically, I know gcc can be used to generate both Intel and At&T style assembly code, but it seems that you can not directly use nasm/tasm to compile the Intel style assembly code gcc generated. I am conducting a…
lllllllllllll
  • 8,519
  • 9
  • 45
  • 80
18
votes
3 answers

Difference between lea and offset

ar db "Defference $" What's the difference between mov dx,offset ar and lea dx,ar I think both are doing same work, but what is the difference between these two
userBI
  • 345
  • 1
  • 5
  • 15
17
votes
3 answers

What does `dup (?)` mean in TASM?

I have this code here, but I'm unfamiliar with the syntax. STACK16_SIZE = 100h stack16 db STACK16_SIZE dup (?) I think dup means we declare a variable of type array, as this is a stack, but I'm not sure. So what does dup mean…
sashoalm
  • 75,001
  • 122
  • 434
  • 781
12
votes
3 answers

I don't understand how to use Interrupt 21, AH=0ah

My information is coming from here. The assignment asks for a program that reads in no more than 20 characters, converts those characters to upper case, and then prints the input as capitals. I have no idea how to access the input from…
user1707505
9
votes
1 answer

Assembly, the meaning behind the colon ":"

I'm new to assembly and I'm currently reading a guide that would frequently express things like ax:bx, ds:dx, ss:sp. I'll use one of the above in an example from the book "Mastering Turbo Assembly" Page 85. Notice that the logical address in ss:sp…
Wobit Nyen
  • 91
  • 1
  • 2
7
votes
1 answer

Using 3Dh causes interrupt to only return "Acces Denied"

Configuration : MS-DOS 16 BIT (writing in a .asm file, then compiling them with TASM and TLINK) Windows 7 x64 I've made a simple program in Assembly that should only OPEN a file and write a text to it. Here is the code to it: assume cs:code,…
SnuKies
  • 1,578
  • 1
  • 16
  • 37
7
votes
2 answers

How to pass/retrieve DOS command-line parameters in a 16-bit assembly program?

I am writing some little tools for MS-DOS. Now I'm writing a Shutdown.com, like for Windows XP and greater. I have already written the entire code, now I just need to pass the argument from DOS. I need to pass the parameters "-r" to reboot and "-s"…
MendaxRox
  • 101
  • 1
  • 7
7
votes
1 answer

Weird Macros (TASM)

Consider the following macros: pixelFast MACRO ; This macro draws a pixel, assuming the coordinates are already loaded in cx&dx and the color is in al. xor bh, bh mov ah, 0ch int 10h ENDM drawRect MACRO x1, y1, x2, y2, color …
Itamar
  • 137
  • 1
  • 8
7
votes
2 answers

Assembly difference between TASM and MASM

I am learning TASM at University, but information regarding TASM on the web seems to be very limited. I have found more information on MASM. My question is, what is the different between MASM and TASM?
Wizard
  • 10,985
  • 38
  • 91
  • 165
6
votes
1 answer

8086 assembly on DOSBox: Bug with idiv instruction?

I was helping a friend of mine debug his program, and we narrowed it down to an issue which occurs even here: .MODEL small .STACK 16 .CODE start: mov ax, 044c0h mov bl, 85 idiv bl exit: mov ax, 4c00h int 21h end start After…
eequinox
  • 63
  • 1
  • 5
5
votes
1 answer

Why isn't my code working when adding .386?

As explained in the title, I need to make this code able to do the same things it do using just 16bit but adding .386 to the code so I can use 32bit registers. But when I add the .386 now my code isn't printing anything, any idea how I can fix this.…
Diego Esquivel
  • 182
  • 1
  • 12
5
votes
1 answer

Calling procedures from another file

I have an .ASM file in which I want to call procedures from another .ASM or .INC file. I have tried writing the following into my main.asm file: INCLUDE file_op.inc However when I try to run it, it just says: 'the emulator is halted.' It does…
Michael Kročka
  • 617
  • 7
  • 22
5
votes
2 answers

How to know if an assembly code has particular syntax (emu8086, NASM, TASM, ...)?

I want to know how,by looking through a sample source code, recognise if the syntax used is em8086, TASM or NASM? I am a new to assembly..I would like to know more about emu8086 please.
user6473027
5
votes
1 answer

What does ASSUME mean in assembler?

Everywhere it is explained as a thing which binds/associates registers with segments, but I want to understand what is bound exactly.
1
2 3
55 56