flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 08 Jun 2008, 02:59
You will have to put the CPU into v8086 mode. You will also have to disable all memory managers drivers and make your own VM to handle it.
|
|||
![]() |
|
sinsi 08 Jun 2008, 03:18
If you are talking about standard ports (COM,LPT etc) you can hook the interrupt.
|
|||
![]() |
|
MazeGen 08 Jun 2008, 19:24
Correct me if I'm wrong, but it could be possible to use hardware breakpoints to monitor port accesses. I remember that hardware breakpoints worked well for me as instruction execution breakpoints in real mode some years ago.
This article discusses debugging features in 64-bit mode, however, it should work also in real mode. See example 4: http://x86asm.net/articles/debugging-in-amd64-64-bit-mode-in-theory/#Hardware-Breakpoints |
|||
![]() |
|
revolution 08 Jun 2008, 19:28
But there are only 4 address points available, that would severely limit the scope of monitoring I/O accesses.
|
|||
![]() |
|
edfed 09 Jun 2008, 00:51
in some conditions:
these four breakpoints can be changed while they are access. assuming the I/O ports will be accessed slowly in a predifined order Code: BPt for 60h: set BPt for 20h ret BPt for 20h set BPt for 60h ret or simply assume the result of your code. If the code works, then, you can be sure you access the ports. |
|||
![]() |
|
revolution 09 Jun 2008, 05:37
edfed wrote: in some conditions: edfed wrote: or simply assume the result of your code. |
|||
![]() |
|
MazeGen 09 Jun 2008, 08:51
It depends on which ports Cas needs to monitor. One hardware breakpoint can monitor up to 8 successive byte ports.
|
|||
![]() |
|
Cas 09 Jun 2008, 22:14
Well guys... what I'm trying to do is in part something that has been tried many times. I know it is possible, but people seem reluctant to do it and in a way, I understand that.
I'm trying to hook the SoundBlaster (220h+x) and MPU401 (330h+x) ports. One thing that makes me think it must not be that extremely complicated is the fact that I know that AWEUTIL (an application to emulate MIDI by redirecting a fake MPU401 UART mode to the EMU8000) does that or something similar. I really don't know how to directly work on the EMU8000 (soundbank chip in the SoundBlaster AWE series), but I believe it is more important to understand the MPU. However, I'd like to know how AWEUTIL does this, to redirect these ports somewhere else and do the same with the SoundBlaster ones. I'm not posting AWEUTIL here because I don't know if it's fine to do it. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.