Re: A86:OnTemp.asm


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

Re: A86:OnTemp.asm




In a message dated 1/12/00 10:22:32 PM Eastern Standard Time, 
RoniBarrett@aol.com writes:

> Well, here's Ontemp itself, i must not have saved the actual program
>  All it does is run a basic program called autoexec (hence the programs 
>  name:Autoexec86), and that part works as long as there is a program called 
>  autoexec 
>  The first one is the only one that concerns me. I have a couple ideas of 
> what 
>  happend with the others.
>  Ive put a * after every line that produces errors:
>  
>  #include "asm86.h"
>  #include "ti86asm.inc"
>  
>  
>  _alt_on_chksum      equ     $d48f
>  _alt_on_exec        equ     $d490
>  
>  .org _asm_exec_ram
>     
>     ld hl,int*   ;says lable not difined  --this is the major problem

This needs to point at alt_on, not int.
    ld hl,alt_on

>     ld de,_alt_on_exec
>     ld bc,alt_on_end-alt_on
>     ldir
>     
>     ld a,(_alt_on_exec)
>     ld hl,_alt_on_chksum+($28*1) * ;I dont see anything wrong with these... 
>  other stuff like this always works for me. Even here, it sometimes works, 
>  sometimes not

The only reason these might not work is that a compiler sometimes has trouble 
figuring out what the parenthesis mean (whether you're accessing memory or 
just performing order of operations).  It's easier to just do code like this:
    ld hl,_alt_on_chksum+40
    add a,(hl)
    ld hl,_alt_on_chksum+80
    add a,(hl)

Of course, there are much more efficient ways of getting checksums, but...

>     add a,(hl)
>     ld hl,_alt_on_chksum+($28*2) *
>     add a,(hl)
>     ld hl,_alt_on_chksum+($28*3) *
>     add a,(hl)
>     ld hl,_alt_on_chksum+($28*4) *
>     add a,(hl)
>     ld hl,_alt_on_chksum+($28*5) *
>     add a,(hl)
>     ld (_alt_on_chksum),a
>  
>     set 3,(iy+$23)
>     ret
>  
>  alt_on:
>     ;insert your code here
>  alt_on_end:
>  



----
Jonah Cohen
<ComAsYuAre@aol.com>
http://linux.hypnotic.org/~jonah/ (down)


Follow-Ups: