flat assembler
Message board for the users of flat assembler.

Index > DOS > int 3 breakpoint?

Author
Thread Post new topic Reply to topic
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite
dos programming from "format MZ",

FASM generates int 3 into opcode db 0xCD, 0x03

but breakpoint is 0xCC

What's wrong with int 3 in FASM?
Post 27 Dec 2006, 02:55
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
You should use int3 instead if you want $CC opcode.
Post 27 Dec 2006, 02:56
View user's profile Send private message Reply with quote
fonolite



Joined: 14 Dec 2005
Posts: 32
fonolite
Oh great! Thanks.

int3 works fine.

I think int3 looks like a macro defined by db 0xCC.
Post 27 Dec 2006, 04:32
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
But it is an assembler instruction
Quote:
int activates the interrupt service routine that corresponds to the number specified as an operand to the instruction, the number should be in range from 0 to 255. The interrupt service routine terminates with an iret instruction that returns control to the instruction that follows int. int3 mnemonic codes the short (one byte) trap that invokes the interrupt 3. into instruction invokes the interrupt 4 if the OF flag is set.


Here a good reason to have the ability of generating both ways http://board.flatassembler.net/topic.php?p=32983#32983
Post 27 Dec 2006, 04:47
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.