D
D
demsp2018-10-14 11:54:56
assembler
demsp, 2018-10-14 11:54:56

What is the difference between tiny model and small model?

I read that tiny is used only for com programs, but I use the tiny model in an exe program, although it seems to be impossible to do this (but the program works).
I also use the push and pop commands on the tiny model. Does this mean I'm putting numbers in the data segment at the "stack" offset?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2018-10-14
@demsp

The tiny model only works in 16-bit DOS applications. In this model, all data and code reside in one physical segment. The size of the program file in this case does not exceed 64 KB. And the small model supports one code segment and one data segment.

S
Saboteur, 2018-10-14
@saboteur_kiev

the tiny model was a long time ago, and you need to understand that .com and .exe are not just binary files, but also a certain file structure so that the operating system understands how to load these files into memory and transfer control to them.
.com was the simplest - one memory segment, that is, a maximum of 64 kbytes, just load and give control to the 100h address.
.exe is much more complicated, where you can load the file on the go, storing anything in it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question