Hi all!

I've written the following code: http://pastebin.com/Anf0TcjZ
When I start up wabbit however, all it does is showing the cursor, so there is no blinking whatsoever.
I'd appreciate if someone could help me out here. I'm pretty sure it's a very simple and stupid mistake, but I haven't been able to find it yet.

Greetings, Arriopolis.
I don't have time right now to really go over this, but here's an example of a working blinking cursor I made in DoorBell you can look at for an example:


Code:
MAIN_LOOP:

        ...

   ld hl, blink_status
   cp (hl)
   jp nz, MAIN_LOOP_NO_DISPLAY_BLINK
   di
   ld a, (ypos)
   push af
   ld a, (xpos)
   push af
   DrawString(BlinkChar)
   pop af
   ld (xpos), a
   pop af
   ld (ypos), a
   ei
MAIN_LOOP_NO_DISPLAY_BLINK:
   pop hl
   ld a, h
   ld (xpos), a
   ld a, l
   ld (ypos), a

...



BlinkInterrupt:
   di
   exx
   ex af, af'                                 ;'
   ld hl, (blink_counter)
   ld a, 10000 >> 8
   cp h
   jp nz, BlinkInterruptSkip25000
   ld a, 10000 & $00FF
   cp l
   jp nz, BlinkInterruptSkip25000
   ld a, 1
   ld (blink_status), a
   jp BlinkInterruptSkip0
BlinkInterruptSkip25000:
   xor a
   cp h
   jp nz, BlinkInterruptSkip0
   cp l
   jp nz, BlinkInterruptSkip0
   ld hl, 20000
   ld (textShadow), hl
   xor a
   ld (blink_status), a
BlinkInterruptSkip0:
   dec hl
   ld (textShadow), hl
   ex af, af'
   exx
   ei
   ret
BlinkInterruptEnd:
Looks kinda nice, but I'd rather not use DoorsCS routines, because I'd like to use it in apps eventually.
arriopolis wrote:
Looks kinda nice, but I'd rather not use DoorsCS routines, because I'd like to use it in apps eventually.


It uses DCS routines to draw the text, but that's irrelevant; it would work with a similar bcall just the same way. What's important is the DCS-independent counter and checking the current status of the blinker to decide whether or not to display the underscore.
I've fooled around with it, but still didn't get any result. New code is at http://pastebin.com/QQ03TtvA. I really hope someone could help me out.
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement