A86: Re:


[Prev][Next][Index][Thread]

A86: Re:






Filipe Alberto Soares Pinto wrote:

> I'd like to ask two questinons
>
> 1.
> Why doesn't this work?
>
> #include "asm86.h"
> #include "ti86asm.inc"
> #include "ti86math.inc"
> #include "ti86ops.inc"
> #include "ti86abs.inc"
>
> .org _asm_exec_ram
>
>         call _clrLCD
>         ld hl,1
>         ld b,3
>         ld c,5
>         ld d,5
>         ld e,1
>         call _ILine
>
> .end
> END
>
> I've tried changinh b,c,d and e value, but it still crashes my calc
>

Besides the missing ret, try using ld h,1 instead of ld hl,1

;-----------------------------------------------------------------------

 ;  _ILine: Draw an unclipped line from (B, C) to (D, E), no clipping!
 ;
 ;        INPUT: Coordinate values input are integer, and assumed
 ;               within screen values.
 ;               B - X Coordinate of first point
 ;               C - Y Coordinate of first point
 ;               D - X Coordinate of second point
 ;               E - Y Coordinate of second point
 ;               H - Command to
perform
 ;                      0 - Set points to light
 ;                      1 - Set points to dark
 ;                      2 - Reverse point (XOR operation)
 ;-----------------------------------------------------------------------

Bill N.
penguin@your-house.com



Follow-Ups: References: