I am trying to learn Assembly through Omnimaga's tutorials. I am currently on lesson 4. I already typed up the 1+5 program code and used spasm to make change it into a .8xp file but this file wont run on the emulator. Can someone tell me why this program wont work?
Omnimaga's tutorials? As in Hot_Dog's? You will have to use the Asm() command to run it. For example, Asm(prgmASM).
souvik1997 wrote:
Omnimaga's tutorials? As in Hot_Dog's? You will have to use the Asm() command to run it. For example, Asm(prgmASM).


Yes I do mean Omnimaga's tutorials. I am am using the Asm() command but it still wont work.
What doesn't work? Does the calc crash or simply exit the program?
Also, can you post your code?
It says ERR: INVALID. Code:
Code:


#include “ti83plus.inc”

.org 40339

.db t2ByteTok, tAsmCmp


   B_CALL _ClrLCDFull

   ld a, 1

; Solve the problem 1 + 5
   
   add a, 5

   ld h,0

   ld l, a


   B_CALL _DispHL

   B_CALL _getKey

   B_CALL _ClrLCDFull

   ret



The indentations don't seem to be working
Indentions in your code are not directly connected to code run on-calc. First off, ".org 40339" Please please PLEASE change that to ".org 9D95h". ".db t2ByteTok, tAsmCmp" can be ".db 0BBh,06Dh". Other than that, it looks fine. Try using Brass and the DCS toolchain to compile and run it.
_player1537 wrote:
Indentions in your code are not directly connected to code run on-calc. First off, ".org 40339" Please please PLEASE change that to ".org 9D95h". ".db t2ByteTok, tAsmCmp" can be ".db 0BBh,06Dh". Other than that, it looks fine. Try using Brass and the DCS toolchain to compile and run it.


I always thought it to be

Code:
.org $9d93
at least that is the way that 28 days does it.
It is .org 9d93h in hex, it is .org 40339 in decimal.
Oops, yeah you are completely right. I always get those confused because of my first IDE, asm8x, which sometimes did it right, and sometimes not. 9D93h is right.
Oh god, I'm so sick of seeing .org 40339. Sad Please, people: .org $9d95-2, or .org $9d93. Please.
I use .org $9d93 for some of my practice programs when I get bored in CAD.... never fails
Quote:
#include “ti83plus.inc”

.org 40339

.db t2ByteTok, tAsmCmp


B_CALL _ClrLCDFull

ld a, 1

; Solve the problem 1 + 5

add a, 5

ld h,0

ld l, a


B_CALL _DispHL

B_CALL _getKey

B_CALL _ClrLCDFull

ret



I know what your error is, type that code, DON'T COPY IT!, because:

#include “ti83plus.inc”

is different of

#include "ti83plus.inc"

The first one won't work.
Oh, an excellent point. He must have been using some editor with "smart quotes". Make sure you use a good plaintext editor like Notepad++, Programmers' Notepad, or even Notepad when you're writing ASM.
what? what was the difference?

Code:
#include "ti83plus.inc"

.org $9d93
.db t2ByteTok, tAsmCmp

Start:
  B_CALL _ClrLCDFull ;This clears the screen
  ld a, 1  ;Sets the a register to 1
  ; Solve the problem 1 + 5
  add a, 5 ; Adds 5 to a, which was 1, so a is now 6

  ld h,0 ;Makes h register 0

  ld l, a ;Makes l register a, which means, l register is now set to 6


  B_CALL _DispHL ;Displays the result (6)
  B_CALL _getKey ;Waits for a keypress until the end of the program
  B_CALL _ClrLCDFull ;This line is not needed

ret


Would this be OK then?
qazz: the difference is in the quotation marks. on the top they are angles inwards and on the bottom they are the standard, multi-purpose characters
Thanks Shmibs. Smile ScoutDavid, that looks like it would work, although I don't recommend using bcall(_getkey) as a Pause surrogate. Perhaps you might consider call Pause?
shmibs wrote:
qazz: the difference is in the quotation marks. on the top they are angles inwards and on the bottom they are the standard, multi-purpose characters


Oh, ic. my mom yells at me for mixing quotations x.x
qazz42 wrote:
shmibs wrote:
qazz: the difference is in the quotation marks. on the top they are angles inwards and on the bottom they are the standard, multi-purpose characters


Oh, ic. my mom yells at me for mixing quotations x.x
You probably mean " and ' quotations. Rules of thumb:

1) Spoken words go in double-quotes. For example, John said, "hello."
2) Someone quoting someone else goes in single quotes. For example, Sarah mentioned, "Earlier today, John said 'hello,' which was quite strange."
3) The pattern continues, alternating single and double quotes
No, we meant the difference between slanted double quotes and non slanted ones. it happens to me when I convert a word document from 2003 to 2007 ><
  
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 1 of 1
» 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