Author Topic: ASM Help  (Read 10177 times)

0 Members and 1 Guest are viewing this topic.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
ASM Help
« on: November 14, 2010, 03:23:12 pm »
I was recently experimenting with some ASM code, and as some of you might be aware, I kind of ****ed up Wabbit. It stopped loading apps altogether and programs weren't running correctly. Reinstalling fixed most of the problems, except that wabbit is now really slow. Anyway, I tried some code, and it didn't appear to work, so I'm wondering if this is just wabbit, or me

Would anyone mind looking over this example code?

Code: [Select]
#include "ti83plus.inc"
.org $9d93
.db 0BBh, 06Dh
     ld hl,0
     ld (CurRow),hl
     ld hl,String
     bcall(_PutS)
     bcall(_getkey)
     ret
String:
.db "Hello World",0

From what I understand, this should display "Hello World" and wait for the user to press a key. The problem is that it's not doing that. It's just running through the program.
« Last Edit: November 14, 2010, 03:23:59 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #1 on: November 14, 2010, 03:34:18 pm »
Indeed, it should. Are you using a shell to run the program?
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #2 on: November 14, 2010, 03:42:12 pm »
No, I'm running it with the Asm( tag from the homescreen.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #3 on: November 14, 2010, 04:09:41 pm »
It works perfectly fine for me O_o.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #4 on: November 14, 2010, 04:15:01 pm »
Would you mind trying the compiled file?
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #5 on: November 14, 2010, 04:18:58 pm »
Sending now :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #6 on: November 14, 2010, 04:20:04 pm »
Thanks :)

You don't have to use your physical calculator though. I wouldn't want my code to break something.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #7 on: November 14, 2010, 04:22:02 pm »
The file disassembles to
Code: [Select]
ld hl,0
ld ($0000),hl
ld hl,string
ret
string:
.db "Hello World",0
O_o
Edit: I sent it to my physical calc because I have Calcsys there ;)
« Last Edit: November 14, 2010, 04:24:00 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #8 on: November 14, 2010, 04:26:42 pm »
That's really odd.

I've checked the Batch file and the source I posted is the entire example code. I can't seem to find any reason for it to ignore the bcalls.

EDIT: Bcalls are included in the 83plus.inc file, right?
« Last Edit: November 14, 2010, 04:27:30 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #9 on: November 14, 2010, 04:28:37 pm »
They indeed are :)
What are you using to assemble it? What does it say?
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #10 on: November 14, 2010, 04:31:21 pm »
I'm using SPASM. It hasn't given me any feedback thus far.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: ASM Help
« Reply #11 on: November 14, 2010, 04:34:37 pm »
That's strange. What's especially disconcerting is that it changed curRow to a 0 and eliminated both bcall's entirely.
Could you try replacing each bcall(xxxx) with "rst 28h \ .dw xxxx", where xxxx is the name of the routine bcalled?
If you could disassemble it yourself, that would be helpful too :)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #12 on: November 14, 2010, 04:58:39 pm »
Replacing the commands throws the calculator into an infinite loop.  :(

By the way, the disassembled program is this:

Code: [Select]
LD B, 21
LD BC, 9D00
or L
NOP
NOP
DEC B
Inc HL
LD BC, 9D00
...

I know that can't be the proper code, but that's what location the VAT lists the program at. Before that location are a few dozen NOPs and after it the code repeats.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASM Help
« Reply #13 on: November 14, 2010, 05:01:56 pm »
That's really odd.

I've checked the Batch file and the source I posted is the entire example code. I can't seem to find any reason for it to ignore the bcalls.

EDIT: Bcalls are included in the 83plus.inc file, right?

It's also ignoring the CurCol load...

Does Spasm give you any errors? Maybe the names weren't defined.




Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASM Help
« Reply #14 on: November 14, 2010, 05:29:02 pm »
Nope. SPASM executes without returning any errors.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ