Re: A83: executing basic progs in assembly


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

Re: A83: executing basic progs in assembly




Yes, I remember in the Asm Guru they had a tutorial on running basic programs 
from within an asm program...
*opens AsmGuru* (takin from Tutorial # 49)

;normal start

NewDispF       equ  8           ;don't know about these
progobj        equ  5
_parseinp      equ  4E8Ch       ;this is the rom call function i think...

.org 9327h
call _zerooop1                  ; Set Op1 to zero
    ld hl,progname1             ; the name of the prog
    ld de,op1                   ; copy it to op1
    ld bc,7                     ; 7 chars in name
    ldir                            ; do the copying
    bit   ProgExecuting,(iy+newDispf)   ;um...I think this gets the data for 
the programming currently running...
    push  af                        ; Save it.
    set   ProgExecuting,(iy+newDispf)   ;Set everthing up for running it...
    call  _parseInp             ; Run program!
    pop   af                        ; Restore state.
    jr    nz,stateset               ; Jump if on

    res   ProgExecuting,(iy+newDispf)   ; reset
stateset:
    ret

Progname1: .db progobj,"JAMES",0

All tutorials Copyright (c) James Matthews 1998, unless specified.

There i add some extra comments cause it's undercommented ^_^ (If I'm making 
a tutorial I, for some reason, comment every stinkin line...
Well i hope that helps