Author Topic: Using the Asm( token inside a program  (Read 3491 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Using the Asm( token inside a program
« on: January 24, 2011, 05:20:18 pm »
If you consider this a bug, then merge into bugs and reports please.

Code: [Select]
.UPROG
Asm(EF4045
Asm(FDCB00AE
Asm(EF7045
Asm(210100
0->I
While I<5
Asm(EF0745
I+1->I
End

(Not sure if this code is correct, it's just a sample one)

Code: [Select]
Asm(EF4045
Asm(FDCB00AE
Asm(EF7045
//The above lines could be changed to:
ClrDraw
DiagnosticOff

In fact, they're just the same thing. However, the second option runs much faster.

Now, the questions:

1. Is it just me?
2. Is it supposed to be like this?
3. If not, can it be fixed?

I think it is supposed to be this way, hence not considering it a 'bug'.

Thanks.

Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: Using the Asm( token inside a program
« Reply #1 on: January 24, 2011, 11:52:51 pm »
I'm no expert in asm but it looks like you're using bcalls. My guess is that quigibo doesn't use _ClrLCDFull for ClrDraw. For DiagnosticOff, my guess is that he resets 0, (IY+12h) and 5,(IY+0) but idk if he went for speed or size with DiagnosticOff. But again, I only just started asm.
It is bad luck to be superstitious.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Using the Asm( token inside a program
« Reply #2 on: January 25, 2011, 12:21:17 am »
Yeah, ClrDraw clears the buffer, not the LCD (and clearing the LCD would definitely be slower, especially if it's a TI-OS routine)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Using the Asm( token inside a program
« Reply #3 on: January 25, 2011, 07:37:18 am »
Yeah, ClrDraw clears the buffer, not the LCD (and clearing the LCD would definitely be slower, especially if it's a TI-OS routine)

I'm no expert in asm but it looks like you're using bcalls. My guess is that quigibo doesn't use _ClrLCDFull for ClrDraw. For DiagnosticOff, my guess is that he resets 0, (IY+12h) and 5,(IY+0) but idk if he went for speed or size with DiagnosticOff. But again, I only just started asm.

Oh thanks! That makes sense now.