Thread: Internal representation of Pacman-style maps

  1. #16
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Quote Originally Posted by Bubba View Post
    Linked list is totally out of the question for older systems. I would agree with the bitfield approach but the max you would get was 8 bits back then.
    Yes. But that would only mean you would have to process 8 bits at a time.
    DEFB 01110010b, 11001001b
    DEFB inserts the bytes following it (as many as you require) at the point it occurs in the program. I used bit representation here because it suits the purpose.

    You'd then just load a byte at a time to one of the registers (register A, the Accumulator, would be the ideal one) and process each bit individually with the BIT instruction which sets or resets the zero flag according to the value of the bit tested.

    You could even operate on 16 bits at a time and stored data with DEFW. The Z80 features register pairs which do provide some 16bit functionality. Loading data into them is as trivial as with 8 bit registers, But since BIT only operates on an 8 bit register (BIT n, r), there wouldn't be much gain here.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  2. #17
    Registered User
    Join Date
    Sep 2008
    Toronto, Canada
    Quote Originally Posted by Sebastiani View Post
    Bleh, I would have hated being a programmer back then. Having to squeeze every last drop of optimization out of it at the expense of writing maintainable code. Depressing.
    It was great! I wish I was back there again. Real job satisfaction! Your code either runs lickedy-split, or it's crap. I like that clarity.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-05-2010, 11:42 PM
  2. Replies: 2
    Last Post: 01-06-2009, 10:37 AM
  3. WM_CAPTION causing CreateWindowEx() to fail.
    By Necrofear in forum Windows Programming
    Replies: 8
    Last Post: 04-06-2007, 08:23 AM
  4. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM