[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Hi Again. Another Machine Language Mission.



1. Take in some coordinates at $EB (horizontal) and $EC (vertical).

2. Multiply the coordinates by 8.

3. Get an 8 by 8 square on the hi-res screen, with the top-left corner at
those coordinates, and put it into eight byte bitmap data, like this:

          +---+---+---+---+---+---+---+---+
          |   |   |XXX|XXX|XXX|   |   |   | Byte 1
          +---+---+---+---+---+---+---+---+
          |   |XXX|   |   |   |XXX|   |   | Byte 2
          +---+---+---+---+---+---+---+---+
          |   |XXX|   |   |   |XXX|   |   | Byte 3
          +---+---+---+---+---+---+---+---+
          |   |XXX|XXX|XXX|XXX|XXX|   |   | Byte 4
          +---+---+---+---+---+---+---+---+
          |   |XXX|   |   |   |XXX|   |   | Byte 5
          +---+---+---+---+---+---+---+---+
          |   |XXX|   |   |   |XXX|   |   | Byte 6
          +---+---+---+---+---+---+---+---+
          |   |XXX|   |   |   |XXX|   |   | Byte 7
          +---+---+---+---+---+---+---+---+
          |   |   |   |   |   |   |   |   | Byte 8
          +---+---+---+---+---+---+---+---+
            ^
            |
  Most Significant Bit

4. Starting at $5000, ending at $5FFF, and going in increments of 8, see
if that bitmap data matches anything.

5. If it does, take the memory address where we found the match, subtract
$5000 from it, divide it by 8, and store the result in $ED (low) and $EE
(high).

6. If it doesn't match anything, store value $FF in both $ED and $EE (thus
resulting in 65535 or -1)

I already know how to do 1 and 2, and I've done that, but I need to know
the rest of it.

Please post in assembly, not machine language.

-- 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         ****** The New Short & Sweet Signature ******

         Mail: processoroverclocked@33mhz.cjb.net 
         Web : http://chelsea.is.dreaming.org
         Chat: http://tamchelchat.cjb.net

           Don't forget: Tammy Day on February 15th!
         Please change '.com' to '.cjb.net' to respond.