Re: A86: ASM Clear-Up


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

Re: A86: ASM Clear-Up




>From: "Chris Flanigan" <cflan@granitecity.com>
>To: "86 Assembly" <assembly-86@lists.ticalc.org>
>Subject: A86: ASM Clear-Up
>Date: Fri, 22 Jan 1999 17:46:26 -0600
>Reply-To: assembly-86@lists.ticalc.org
>
>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?


You're right


>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


Ah doesn't equals $10 !!! $10 equals 10h. You can use h or $. depends 
how you feel it (pascal or c)


>
>
>--------------------------------------------------------------------------------
>
>
>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).
>

For the letters, the codes are the same one. But you can use all the 
others codes to get particular characters. See in Assembly studio 86 
help for the complete table (download it at : 
www.stupidzone.com/asmstudio/)



>-------------------------------------------------------------------------------
>
>
>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 (You're right)
>
>ld hl, $00                                     ; stores $00 in h, $00 
in l ===> not exactly just l is loaded. so you must put ld hl, 0000h
>
>ld (_curRow),hl                             ; stores 0 in _curRow, 0 in 
_curCol
>
>ld hl,string                                   ; loads string into the 
HL register ===> not exactly, it loads the string address in hl
>
>call_puts                                     ; puts "This is example 
>text." on the screen
>
>ret                                             ; returns to TI-OS or a 
shell  ===> Exit from a program (if no previous call)
>
>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.=20

If you had done some C programming, you should have heard about 0 
terminal byte. In fact, this byte indicates the end of the string
>
>
>--------------------------------------------------------------------------------
>
>
>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.)
>

USE DAVID PHILIPP'S FAST_FIND_PIXEL Routine (you must have received it 
in the mailing list)

>
>--------------------------------------------------------------------------------
>
>
>Thanks again for your time (if you read). :)
Yeah I read.
>
>I'll probably write a few more messages in time. I'm learning ASM 
>moderately fast so...
>
>
take car with your exams (if you get some)



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com