Calvin Allett
Tue, 07 Aug 2007 17:42:57 -0700
I see how the keys on the left/right hand side of the keyboard have the bits reversed... I am (currrently), was gonna just go with tested values (15,23,27,29,30 or reversed) but cheers for the Basic example of how to use BAND, and what it is.... I can`t believe I had forgot about/never used it... so it`ll probably come in handy getting familiar with it, as I could mess about with other ports hopefully :D Colin Piggot <[EMAIL PROTECTED]> wrote: The manual for Simon's excellent Turbomon has the keyboard port map (http://simonowen.com/sam/turbomon/TurboMON.pdf) Quickly looking at the PDF myself the ports you need are: O - IN 57342 - (bit 1) P - IN 57342 - (bit 0) Z - IN 65278 - (bit 1) M - IN 32766 - (bit 2) SPACE - IN 32766 (bit 0) The first five bits of each port is used for keys, so BAND is an excellent way to strip off the unwanted bits to check, and the bits will be LOW if the key is pressed, so to test bit 0, do BAND 1, bit1 - do BAND 2, bit 2 - BAND 4 ... E.g. test for say, O, in BASIC.... IF NOT ((IN 57342) BAND 2) THEN ..... Colin ====== Quazar : Hardware, Software, Spares and Repairs for the Sam Coupe 1995-2007 - Celebrating 12 Years of developing for the Sam Coupe Website: http://www.samcoupe.com/ --------------------------------- Yahoo! Answers - Get better answers from someone who knows. Tryit now.