I'm trying to use 32-bit registers since I need a bigger maximum integer value. When I try to use EAX, EBX, ECX, or EDX, the TASM says UNDEFINED SYMBOL. TASM is reading the registers as variables. Do know the reason why? I'm using the DOSBOX 0.74 and running on Windows 7 64 bits.
Asked
Active
Viewed 1,688 times
0
-
Code? Command line invocation? *Context?* – Sep 20 '12 at 12:48
-
1DOSBOX simulates MS-DOS, which runs in 16-bit mode. You probably should be using Windows these day (although I appreciate there are a lot of assembly tutorials floating about that refer to 16-bit systems). And as @paxdiablo suggests, you should be using something like nasm. – jleahy Sep 20 '12 at 13:05
-
1@jleahy: DOSBox simulates a 386-compatible (at least) running in 16-bit mode. 32-bit operand-size is available with an operand-size prefix. IDK why anyone would want to write new code for that target, but you certainly *can* use 32-bit registers in 16-bit mode. The only thing that's inaccessible on real HW in 16-bit mode is 64-bit registers (and AVX instructions; the VEX prefix isn't recognized in 16-bit mode). – Peter Cordes Jan 18 '20 at 10:27
1 Answers
3
TASM as in Borland Turbo Assembler? I'd be surprised if something that old even knew about 32-bit registers :-)
TASM v5 was from about 15 years ago.
From memory, there was a TASM32 (this may be part of your package) which could do this but I'd suggest getting a more modern assembler, like nasm
.

paxdiablo
- 854,327
- 234
- 1,573
- 1,953
-
Oh!So that's how it is. If I switch into nasm and like, all the codes are the same, right? – shriekyphantom Sep 20 '12 at 12:52
-
2TASM 3.x assembles 32-bit code. One may need to put a special directive at the beginning of the file to enable it: `.386`. – Alexey Frunze Sep 20 '12 at 12:58
-
1@Alexey, it may, I'm not sure. I still think you'd be better off with a more modern assembler. This is the same advice I give to TurboC users - there's no need to use such archaic stuff when more modern (and better) stuff is available for free. – paxdiablo Sep 20 '12 at 13:06
-
I tried using the tasm32 bit but unfortunately, it can't run on DOSBOX from what I have understand. – shriekyphantom Sep 20 '12 at 13:14
-
1@shriekyphantom Use NASM. It's free, it's great, it's available for DOS, Windows and Linux. – Alexey Frunze Sep 20 '12 at 13:25
-
2".386" will enable 32-bit registers/instructions if it's in one place, and ask for 32-bit code in another place. I think ".386" wants to go after the ".model" directive for what you want, but if that doesn't work try it before. I'm a big Nasm fan - http://www.nasm.us - but Tasm is a fine assembler, and you should be able to use it if you want to. You have to know how to use ANY tool, of course. If all else fails, RTFM. :) – Frank Kotler Sep 20 '12 at 20:25