Where should I place "b_call(_getKey)"?
TI_Coder wrote:
Where should I place "b_call(_getKey)"?
As the very last thing it your program, right before the ret, because you want to pause right before you return. If you were using Doors CS routines, you could just call Pause. Wink
Put it at the place where you want the program to pause, which should probably be right before the ret.
This has a weird effect... I put "b_call(_getKey)" in the line before "ret", and now, when I run it, it shows a blank screen, pauses, then when i hit a button, it displays the line and quits. Not what I want at all
Did you add the grbufcpy_v we mentioned? Did you add the textwrite,(iy+sgrflags) I've been talking about?

By the way, I just want to take a moment and recognize the time and effort that Tanner put into his post on the first page of this topic explaining how the base program works. That was a most excellent job.
alright, where would i place those two commands? Sorry, I'm _NEW_
TI_Coder wrote:
alright, where would i place those two commands? Sorry, I'm _NEW_
Right before the ClrLCDFull, add this:
Code:
    set textwrite,(iy+sGrFlags)
Immediately before the final ret, reverse it with:
Code:
    res textwrite,(iy+sGrFlags)
Ok, I did this. This still doesn't affect the pause... It's pausing, then displaying. I want it to display, then pause. Here is the code now...


Code:

.nolist
    #include    "ti83plus.inc"
.list
.org    $9D93
.db    t2ByteTok, tAsmCmp
   Start:
    set textwrite,(iy+sGrFlags)
    b_call(_clrLCDFull)
    ld a,$FF
    ld b,12
    ld hl,plotSScreen+(0*12)
   
   Loop:
    ld (hl),a
    Inc hl
    djnz Loop
         b_call(_getKey)
    res textwrite,(iy+sGrFlags)
    ret
.end
.end
You still don't have the grbufcpy_v, which copies from the LCD buffer to the LCD:


Code:
.nolist
    #include    "ti83plus.inc"
.list
.org    $9D93
.db    t2ByteTok, tAsmCmp
   Start:
    set textwrite,(iy+sGrFlags)
    b_call(_clrLCDFull)
    ld a,$FF
    ld b,12
    ld hl,plotSScreen+(0*12)
     
   Loop:
    ld (hl),a
    Inc hl
    djnz Loop
    //---WRITE THE HELLO WORLD TEXT HERE ---//
    b_call(_grbufcpy_v)
    res textwrite,(iy+sGrFlags)
    ret
.end
.end
Ok! Progress! Now, after it pauses and I press enter to continue it, it shows the axes, and then i have to clear out of the prgm. I dont want this...
TI_Coder wrote:
Ok! Progress! Now, after it pauses and I press enter to continue it, it shows the axes, and then i have to clear out of the prgm. I dont want this...
Running under a certain awesome shell would you save you from that... Wink
I know, but you need to realize that I want as many people as possible to be able to use my programs. I don't know what it is, but I refuse to use libraries of any kind. Sorry
TI_Coder wrote:
I know, but you need to realize that I want as many people as possible to be able to use my programs. I don't know what it is, but I refuse to use libraries of any kind. Sorry
I was once like that too; I scorned even hybrid BASIC as an abomination. Needless to say, I got over myself. Smile
Well, other than using libraries and DCS, (I love DCS, but not everyone has it) how can we solve this issue?
If you ever want to continue with programming, you're going to have to use libraries, especially when making computer programs. It's best if you learn how to use libraries early on, so you don't get confused later.
Right now, I just want to display a horizontal line...
If I recall correctly, as the last line before the ret, you may be able to "res PlotDisp, (iy+Plotflags)" to make it show the homescreen when your program exits.
That definitely worked! Now, how can I set a variable, say Z, and make a loop like this:

For(Z,0,30)
Horizontal Z
End
For the For() loop, use the djnz command. Example:

Code:

 ld b,30
Loop:
 ;code that gets executed 30 times
 djnz Loop
 ret
If you just want to fill the first 31 lines of the LCD, then you'd do:


Code:
    ld hl,gbuf
    ld bc,12*31 ;12 bytes per row, 31 rows
DoFillLoop:
    ld (hl),$ff ;8 pixels of black
    inc hl ;move forward 8 pixels
    dec bc
    ld a,b
    or c ;is bc zero yet?
    jr nz,DoFillLoop ;if not, loop
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement