Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 4,586 of 4,675    |
|    Paul Edwards to se...@nospicedham.conman.org    |
|    Re: serial port    |
|    15 Apr 23 18:19:12    |
      From: mutazilah@nospicedham.gmail.com              On Sunday, April 16, 2023 at 7:37:08 AM UTC+8, se...@nospicedham.conman.org       wrote:              > I replied once with some code, but it seems you didn't see it, so I'm        > replying again.              Sorry. I wasn't sure what to reply with, and I was still in       the process of debugging. Yours a different design,       and assembler-focused. I know this is an assembler group,       and I am indeed using assembler, but I'm trying to minimize it.       The required minimal assembler has already changed       numerous times to try to get this very basic functionality       working.              I'm not disputing that it wouldn't work or be better.              But I have a different design I am trying to get to work.       (and it should work - and the fact that it only half-works       is exactly what I want to see and understand).              > Why are you installing, then uninstalling, the interrupt handler for each        > character?              So that I can see an understandable sequence until I       am happy that the sequence is right.              I can potentially move that later. But I probably won't,       because the interrupt may be shared. And code       elsewhere would use the same assembler routine,       same interrupt number, same simple logic, and still work.              > And I think you are making this out to be more complicated that        > it should be.              It is more complicated for an assembler programmer, but       not more complicated for a (or at least, this) C programmer,       because almost all the logic is in C.              > As I wrote before, the interrupt handler for the UART can be        > as simple as:        >        > pause:        >        > hlt ; halt CPU        >        ...       > bne pause ; if not, keep waiting               And I can't move this code out into C, due to this requiring       the stack pointer isn't changed.              I don't wish to use inline assembler either - I want my       C code to be C90-compliant.              > You need to tell both the 8259 and the UART that the interrupt has been        > handled.               I believe my code does that.              BFN. Paul.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca