Author Topic: GAME: Optimize this! (z80 assembly)  (Read 12404 times)

0 Members and 1 Guest are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
GAME: Optimize this! (z80 assembly)
« Reply #15 on: August 28, 2007, 03:35:00 pm »
What's with the "ld c,(hl) \ inc hl \ dec c"? You never use c for any reason whatsoever.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Fallen Ghost

  • Guest
GAME: Optimize this! (z80 assembly)
« Reply #16 on: August 28, 2007, 03:59:00 pm »
Well, what's the point of putting hl to 0 prior to loop and then using it as a counter like I use the acc. instead?

There's none, it's just a piece of code to optimize. If you want my opinion, this routine could be replaced by "ret" and it would output the same, but it seems we have to care about whatever the routine does.  

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GAME: Optimize this! (z80 assembly)
« Reply #17 on: August 28, 2007, 04:17:00 pm »
Please quit complaining lol, fyi we just started those contests up, and they were planned in about 30 minutes (including the BASIC contest), and this is the very first piece of code. Just don't try to kill the contest project on its first piece of code lol, give it a chance. On next piece of code we'll take your suggestions into account

Offline Halifax

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1334
  • Rating: +2/-1
    • View Profile
    • TI-Freakware
GAME: Optimize this! (z80 assembly)
« Reply #18 on: August 28, 2007, 06:18:00 pm »
On the next piece of code someone else can make up something. As DJ_Omnimaga said this was done in > 30 minutes. It was at least more activity, then what was being output prior to our contests. Next time someone else can do it. If you think this is bad, then you should try being in my Computer Concepts class where you write programs that are meant to do nothing and you can't even build them to test them. This contest was meant to be an algorithmic contest as I said before. Better algorithms should be recognized even on non-working code.

@Fallen_Ghost: Obviously yes your routine is the best, and what I consider the most optimized.

Fallen_Ghost wins!
There are 10 types of people in this world-- those that can read binary, and those that can't.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
GAME: Optimize this! (z80 assembly)
« Reply #19 on: August 28, 2007, 06:21:00 pm »
COngrats!