A86: ASM Clear-Up


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

A86: ASM Clear-Up



I apologize to those who don't care if I learn ASM or not. I also apologize for the length of this message.
 
I didn't want to clutter your mailboxes with tons of messages so I put it in one.
 

 
Many of you advanced ASM programmers may think I'm ignorant, and I am, to the ASM language. I'm unclear on bit rotation, incrementing and decrementing.
 
If I have %00000000 and increment it, what do I have? Is it %00000001?
 
If I have %00000000 and decrement it, what do I have? Is it %11111110?
 
If I use my on-calc hex converter and I convert 10 to hex I get Ah. I understand
that A=10, B=11, C=12, D=13, E=14 and F=15. The $ takes place of the h right? So Ah really equals $10 right. But if I convert 16 to hex I get 10h. How? Do binary numbers come into play?  Some examples in a fair tutorial I read were that 59=3bh and thus equals $ff
 

 
Does anyone actually know the ASCII code for the TI calculators? I'm familiar with that of the PC because I've been programming in Q-BASIC for around 3 years. (I got bored.) For example, is A still 65, B 66, C 67. I know the syntax is not the same (in QB PRINT CHR$(ascii-code).
 

 
This is the first coding I tried. I compile it with Assembly Studio 86. It compiled correctly but it didn't work correctly on the calc. It didn't print the text. I then compile it with make86p and it worked. Does anyone know why?
 
#include "asm86.h"                        ; include file
#include "ti86asm.inc"                    ; include file

.org _asm_exec_ram                      ; .org $d748 (in ti886asm.inc)

call_clrLCD                                   ; calls the clrLCD ?rom? function

ld hl, $00                                     ; stores $00 in h, $00 in l

ld (_curRow),hl                             ; stores 0 in _curRow, 0 in _curCol

ld hl,string                                   ; loads string into the HL register

call_puts                                     ; puts "This is example text." on the screen

ret                                             ; returns to TI-OS or a shell

string:                                        ; label for string

.db "This is example text.",0            ; actual string text

.end                                           ; end of program

From what I understand of ASM this should work. But I don't know why it doesn't. This little bit of code is basically what is in Dux Gregis' tutorial. I figured I should give him a little credit for his time.
 
What does the ',0' mean after the string text? I see it often but don't actually know the point.
 

 
I've been experimenting with the TI-BASIC Sprites and I sort of understand the concept but I don't quite get it. I guess with a little practice I will. I wonder why TI didn't include some sort of way (like the TI-85) to find the correct pixel that you need. I think the syntax is something like call_nextpixel. (Mind you that I'm not sure at all and I'm very new to ASM. If it's wrong, ignore it.)
 

 
Thanks again for your time (if you read). :)
 
I'll probably write a few more messages in time. I'm learning ASM moderately fast so...
 
 
 
 
This message was written by Chris Flanigan.
 
If this is in reply to an inquiry about the TI Archive, direct
all e-mail to ti_archive@hotmail.com.
 
If this is a personal message, direct all e-mail to cflan@granitecity.com