Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!snorkelwacker.mit.edu!ai-lab!rice-chex!bson From: bson@rice-chex.ai.mit.edu (Jan Brittenson) Newsgroups: comp.sys.handhelds Subject: Re: Questions RE: saturn processor (esp 28, also 48) Message-ID: <11992@life.ai.mit.edu> Date: 21 Nov 90 22:55:53 GMT References: <72330.274a4cb2@vaxc.cc.monash.edu.au> Sender: news@ai.mit.edu Organization: nil Lines: 31 In article <72330.274a4cb2@vaxc.cc.monash.edu.au> apm279l@vaxc.cc.monash.edu.au writes: >(1) According to the now biblical processor notes (thanks Alonzo!) > the branch instructions affect the carry. I need to know *how* > it is affected. I *guess* that (for example) brgt.f a,c,label > does a subtraction, but is it "a-c" or "c-a"?? what about > breq, brge, brle, brlt etc. What about brz and brnz?? The carry flag is set whenever a branch is taken, and cleared when not taken. >(3) gosub, gosubvl, gosubl also affect carry - is this because the processor > takes PC.a+OFFSET.a ? Where did you find your processor notes?! My says nothing about "gosub" instructions and branches affecting the carry. >(4) How do the IN and OUT registers get used? (I know they are used somehow > for I/O - but what happens, for example when you put something in OUT, > how does IN receive input? and from where? - I though the keyboard was > bufferred in memory (#F.... something) Various bits go to different places. The keyboard is scanned by software. OUT bit 10 turns the speaker off, 11 turns it on, and the bits 0-4 are used to output the keyboard column when scanning. Bit 0 is the right-most column. Scanning is performed by putting the column mask in the OUT register and reading the row pattern with IN. Bit 0 is the bottom row, and bit 8 the top (menu) row. I'd love to know how the remaining bits are used!