[A83] Re: CREATEPICT


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

[A83] Re: CREATEPICT



I deleted the picdata label and replaced that line with ld hl,(gbuf), but it 
still saves a glitchery image into pic1.  Anyone else got any ideas?  Here is 
the source after I made that change:
        .nolist

        #include "ion.inc"      ;tells TASM--the compiler--what file to read 
from to define rom call memory addresses and such
        .list
_CreatePict = 4333h
PICOBJ = 07h
lcdinstport = 10h
lcddataport = 11h
tPic1 = 00h         
tVarPict = 60h

#ifdef TI83P            ;a check for TASM to see whether it is making an 83 
program--if so, do the next two commands
        .org    progstart-2
        .db     $BB,$6D
#else               ;if it isn't an 83 program, then do something 
[#]else--the next line
        .org    progstart
#endif              ;simply ends the #ifdef command
        ret             

        jr      nc,begin        ;Jumps to the beginning of the program (this 
line and the below three will be 
        .db     "Create A Pic",0        ;The title displayed by ION--anything 
you want
begin:              ;defines where label begin is, program code follows this 
label
    ld b,8                  ;the sprite is 8 high
    ld a,0                  ;make register equal zero (0)
    ld l,a                  ;now make register l equal (0)
    ld ix,sprite                ;load the sprite into register ix
    call ionPutSprite           ;call the library
    call IonFastCopy            ;copy the graph buffer to the 
screen--displays the sprite!
    bcall(_zeroop1)   ; load var name
    ld hl,picname     
    ld de,op1         
    ld bc,3          
    ldir              
    bcall(_chkfindsym)  ; look it up
    jp nc,load_data   ; skip to loaddata if exists.
    bcall(_createpict)  ; else create pic
load_data:
    inc de            ; skip 1st length byte
    inc de            ; skip 2nd length byte
    ld hl,(gbuf)     ; pic data
    ld bc,756         ; pic size
    ldir              ; copy data
    ret
picname:
; Recall our tokens class...?
    .db picobj,tvarpict,tpic1

sprite:                     ;defines the sprite! Its a shiny ball where: 
1=pixel on and 0=pixel off
    .db %00111100
    .db %01000010
    .db %10001001
    .db %10000101
    .db %10000001
    .db %10000001
    .db %01000010
    .db %00111100
.end
END