flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Madis731 20 Jun 2010, 18:35
Usually the documentation tells you what they want - if you are told to pass WORD, then you cannot pass two BYTEs and the other way round, because what you pass (BYTE, WORD, DWORD) will change the behaviour of the IN and OUT.
|
|||
![]() |
|
baldr 20 Jun 2010, 19:28
score_under,
in al, dx reads byte-sized port, whereas in ax, dx reads word-sized one. Reading byte-sized port twice rarely substitutes for latter. The same for ins / out / outs. Most modern hardware understands word-sized out instead of two byte-sized to adjacent ports. Good example of this is VGA programming (GC and CRTC registers follow index/data scheme). |
|||
![]() |
|
DOS386 27 Jun 2010, 11:05
> Is that the same as
Definitely NOT. May "seem to work" with some hardware (even worse with NTVDM "hardware") but is different and such bad use of IN or OUT may hang the PC ![]() PS: you can't read the PIC as WORD, and when reading 2 separate Byte's, the result can be wrong, guess why ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.