Re: A86: FindPixel Routine
[Prev][Next][Index][Thread]
Re: A86: FindPixel Routine
Yeah simple. When you call FindPixel, HL returns with the memory address, and A returns the "mask". the "mask" has the bit high that you were looking
for.. leave out your line
ld a,1
and everything will be alright. When you set A to 1, you were putting in the binary number %00000001.. so it put the pixel on that is 8 (not 5) pixels over to
the right.
so after your FindPixel call this is what was set:
HL = $FC10
A = %01000000
(i'm assuming the top-left is 0,0)
when you set A to %00000001 you actually wrote to (8,1)
Ricci E. Adams wrote:
> Could somebody please tell me what is wrong with this? I am trying to put
> a pixel at (1,1) but it comes up around (5,0)
> - Thanks
> Ricci Adams
> #include "ti86asm.inc"
> .org _asm_exec_ram
> ld e, 1
> ld d, 1
> call FindPixel
> ld a,1
> ld (hl),a
Trent Lillehaugen
Computer Engineering Major
California Polytechnic University, San Luis Obispo
<http://www.calpoly.edu/~tllilleh/a86/a86.html>
<mailto:tllilleh@polymail.calpoly.edu>
References: