Re: A86: Some stupid error I can't seem to find!
[Prev][Next][Index][Thread]
Re: A86: Some stupid error I can't seem to find!
Kirk Meyer wrote:
> nobody listens to me do they?!? you must insert a HALT where I marked.
> any changes i made are in CAPS.
In Z-Blitz I used 1 nop and 0 halts; it works fine.
>
>
> #include "asm86.h"
> #include "ti86asm.inc"
>
> .org _asm_exec_ram
>
> call _clrLCD
> call _runindicoff
> ld hl, $0000
> ld (_penCol), hl
> ld hl,start
> call _vputs
> loop:
> HALT ;<-- you MUST put a halt or di here!
> xor a ;what is this for?!?
> ld a,%01111110
> out (1),a
> nop \ NOP ;four nop's per read, not two
> nop \ NOP
> in a,(1)
> bit 3,a
> jr z, up
> bit 2,a
> jr z, right
> bit 1,a
> jr z, left
> bit 0,a
> jr z, down
> ld a,%00111111
> out (1),a
> nop \ NOP ;four nop's per read, not two
> nop \ NOP
> in a,(1)
> bit 6,a
> jr z, exit
> jr loop
> up:
> ld hl,mup
> call _vputs
> jr loop
> down:
> ld hl,mdown
> call _vputs
> jr loop
> left:
> ld hl,mleft
> call _vputs
> jr loop
> right:
> ld hl,mright
> call _vputs
> jr loop
> exit:
> CALL _CLRSCRN ;using clrscrn gets rid of any variables you
> may have stored as well as clearing the screen
> ret
>
> start:
> .db "START: ",0
> mup:
> .db "UP",0
> mdown:
> .db "DOWN",0
> mleft:
> .db "LEFT",0
> mright:
> .db "RIGHT",0
>
> .end
>
> --
>
> =====================================
> = =
> = Kirk Meyer (mailto:_@ibm.net) =
> = http://www.bigfoot.com/~kirkmeyer =
> = http://simcommunity.home.ml.org =
> = =
> = "Set your affection on things =
> = above, not on things on the =
> = earth." Colossians 3:2 =
> = =
> =====================================
Follow-Ups:
References: