Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message

Active Member

Joined: 19 May 2009
Posts: 520

Posted: 12 Apr 2012 05:28:12 am    Post subject:

Hmm, just took a more detailed look:


    CP sk6
    CALL Z, AddBullet
    LD HL, count
    LD A, (HL)
    CP 0
    JR Z, InfiniteLoop
    PUSH AF                   ;you push... okey dokey

    LD HL, wait
    LD A, (HL)
    INC A
    LD (HL), A
    CP 0
    JP NZ, Infiniteloop     ;If your wait loop isn't zero, you never pop D:

Also, instead of INC A \ LD (HL),A, you can do INC (HL) and you don't even need the CP 0. When you do INC or DEC on an 8-bit register, if it reaches zero, the z flag is set, otherwise it is nz.
Back to top

Advanced Newbie

Joined: 28 Nov 2011
Posts: 72

Posted: 12 Apr 2012 11:07:11 am    Post subject:

Nooooo! How is this possible... I can't believe i didn't notice it. I allready made this mistake once in my hello-interrupt program and i swore i would'n make it again...

There is just one easy bug to fix that i skipped untill this is fixed. Thanks for the tip!
Back to top

Active Member

Joined: 19 May 2009
Posts: 520

Posted: 12 Apr 2012 02:22:16 pm    Post subject:

No problem XD I make lots of silly mistakes. I once had to delay updates to one of my programs for a few months because it would on occasion randomly crash. (literally, the same code would sometimes take only 18 iterations to crash, other times thousands) What was the issue? Interrupts and me playing with the stack. I was changing the stack pointer around and occasionally an interrupt would fire and do pushes and pops overwriting key data. I took a few months to tease that out, but I said I wouldn't do it again and then a few weeks later I turned around and did just that XD.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    » Goto page Previous  1, 2
» View previous topic :: View next topic  
Page 2 of 2 » All times are GMT - 5 Hours