Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 27th, 2012  |  syntax: None  |  size: 0.84 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. OK. So buffer and bufferlength come as arguments to the getline function. Then you allocate room for a counter on the stack, and put the address into the X register. I suppose that register A, B, C, X are meant as arguments to the interrupt handler, when you trigger the software interrupt, right? Wont A get overwritten? Or are the interrupt handler simply meant to find it in the stack? Also, why is a software interrupt preferred over a normal JSR?(this is more of a general question)
  2.  
  3. I don't understand your use of the IAQ calls either. It seems you turn off interrupts (IAQ 1) when you really want to turn them on, and vice versa. Why should the getline routine even decide if interrupts are turned on or off by the way?
  4.  
  5. Lastly, you seem to check the value of the counter, against the address of the counter (IFL PEEK, X) how does that make sense?