Questions tagged [tasm]

Turbo Assembler is an x86 assembler by Borland

Turbo Assembler is an x86 assembler by Borland.

833 questions
5
votes
2 answers

TASM 1.4 - Displaying a particular colored string?

I'm using TASM 1.4 and I'm trying to make an output that will display different colored sentences, all in the same screen. I can make something that displays colored texts, but the words all have the same color. How do I make something that displays…
xTan
  • 77
  • 1
  • 11
5
votes
1 answer

Assembly - bubble sort for sorting string

I am writing a program in assembly using tasm. My task is to write a program that will use bubble sort to sort entered string alphabetically. Ex. if you enter "hello" it should write "ehllo". I have writened the begging to enter string and to sort…
Lukas Karmanovas
  • 409
  • 1
  • 4
  • 14
4
votes
3 answers

Assembly x86 (16bit): More accurate time measurement

I'm programming in TASM 16bit with DOSBox and here's today's issue: Using DOS INT 21h/2Ch I can get the system's current hundredths of a second. That's good and all... until it's not. See, I'm looking for an at least semi-accurate time measurement…
4
votes
1 answer

Trying to get the name of the currently running .COM program. Where is it stored?

I'm trying to get the name of the currently running .COM file. I know that int 21h functions 4Eh (SearchForFirstMatch) and 4Fh (SearchForNextMatch) will put the name at offset 1Eh in the DiskTransferArea DTA, but is the name of the currently running…
AndrewHoover898
  • 159
  • 1
  • 9
4
votes
1 answer

color palette not working on certain colors in VGA

I'm trying to set the VGA(640x480x16) color palette in assembler on DOSBox but specifically colors 6, 8-F don't change. I have tried using interrupts and directly through ports both work for other colors but not for those. I'm using DOSBox 0.74-3 on…
Saar BS
  • 43
  • 3
4
votes
1 answer

set the alignment of the data segment in TASM ideal mode

My assembly source code: ideal model tiny segment _data byte ; TASM doesn't accept it. ends _data dataseg align 1 ; Doesn't decrease the segment alignment. lpText db "Hello, world!$" codeseg startupcode lea…
pts
  • 80,836
  • 20
  • 110
  • 183
4
votes
1 answer

How to calculate the total size of a TSR block from multiple .asm files?

After 23 years since the last time I did something in assembly I'm now writing a DOS TSR program just for the fun of it. I had a rather big source file and I decided to split it into smaller .asm files. The problem is that I'm having problems to…
Trap
  • 12,050
  • 15
  • 55
  • 67
4
votes
4 answers

Change the background color of dosbox console when executing a tasm program

I am trying to display x in the center of the screen and then change the background color of the console to blue. I have the following code that accomplishes everything except for changing the background color: TITLE screen1.ASM .MODEL…
SoulRider
  • 145
  • 2
  • 3
  • 11
4
votes
1 answer

Memory-Mapped Graphics Output

I'm exploring into drawing pixels and lines, using Memory-Mapped Graphics. I'm using TASM in Textpad, in Windows. When I click run the whole screen turns blue and that's it, no pixels drawn. .model small .stack .data saveMode db ? xVal dw ? yVal…
4
votes
1 answer

Working with two data segments in TASM

I want to work with two data segments in my TASM program. I know, it sucks, but I have to have two pretty big arrays, each one FFFFh in size (and I wish I could have them bigger). I ASSUMEd the segments as following: assume cs:code, ds:data,…
Barak Nehmad
  • 67
  • 2
  • 8
4
votes
2 answers

Program solving expression in assembly

I have a problem with my simple program in assembly. I'm using DOSBox and TASM. The problem is that the operand types don't match in lines 76, 78, and 80. This is after multiplication. I tried to make some changes by using a different variable…
Mack
  • 81
  • 1
  • 2
  • 7
4
votes
1 answer

8086 TASM: Illegal Indexing Mode

I am writing an 8086 assembly program that needs to compile through TASM v3.1. I am running into an error I can not seem to fix. My data segment has the following set up for the purposes of keyboard input: paraO Label Byte maxO DB 5 actO DB ? …
Roberek
  • 43
  • 1
  • 3
4
votes
1 answer

Tasm can't locate include file

In my program.asm I include file with the tasm directive include "file.asm" however I get an error "Can't locate file file.asm". The file is in the same directory as the source code which is D:\source. Tasm is in directory D:\tasm. I tried to…
evodevo
  • 479
  • 1
  • 7
  • 14
3
votes
1 answer

Does gcc really know how to output NASM Assembly

So I have a simple C program that loops through the args passed to main then returns: #include int main(int argc, char *argv[]) { int i; for(i = 0; i < argc; ++i) { fprintf(stdout, "%s\n", argv[i]); } return…
Matthew Hoggan
  • 7,402
  • 16
  • 75
  • 140
3
votes
0 answers

Assembly language initialization of floating-point unit

Just out of curiosity I'm fiddling around with some demoscene 256 byte intros. I came around one production which ran fine under MS-DOS 6.22 but crashes under FreeDOS 1.3 - "sometimes". It turned out that it ran fine when executed after some other…
Codor
  • 17,447
  • 9
  • 29
  • 56
1
2
3
55 56