Pages: (2) [1] 2  ( Go to first unread post ) add reply  new poll 

 Convert Hello World From Ti83+ But Ti83
contra-sh
Posted: Nov 5 2009, 04:03 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



Hi !

I begin asm, could you help me please...

Firstly, a little precision : all this is on emulator tilem, not on real calc !

I reach to execute asm code on ti83+ with Asm( ...

Here the hello world who works :

.NOLIST
#define EQU .equ
#define equ .equ
#define END .end
#define end .end
#define bcall(xxxx) rst 28h \ .dw xxxx
#include "ti83asm.inc"
.LIST

.org 9D93h
.db $BB,$6D
ld a,0
ld (CURCOL),a ;WARNING without tabulation before it doesn't work with spasm !!!!!!!!!
ld (CURROW),a
ld hl,text
bcall(_PutS)
ret
text:
.db "Hello, World",0

.end
end


When I try to test it on TI83, Asm( doesn't exist but I heard that send(9pgrmHELLO could launch asm...
I have an error
ERR:SYNTAX

Without typing Send(9 I get a graphic bug screen ! (see the image)


Obviously I made the change that seems mandatory and test many solutions...

The principal modification is to change .org 9D93h to .org $9327 , isn't it?

Hello world for ti83 (doesn't work !) :

.NOLIST
#define EQU .equ
#define equ .equ
#define END .end
#define bcall(xxxx) rst 28h \ .dw xxxx
#define end .end
#include "ti83asm.inc"
.LIST

.org $9327
.db $BB,$6D
ld a,0
ld (CURCOL),a
ld (CURROW),a
ld hl,text
bcall(_PutS)
ret
text:
.db "Hello, World!",0

.end
end


Is the ti83asm.inc destined for ti83plus only...?
Is it another error in this code ?
Maybe I forget modifications??

Which another little asm no stub program could I test on the emulator?
(For the moment, I hadn't reach to run 0 program on the emulator ... Only the patch of floppusmaximus)

Did you have an idea...?

Thank you very much.



contra-sh
(aka IRC : azerti)

Attached Image (Click thumbnail to expand)
Attached Image
Top
tifreak8x
Posted: Nov 5 2009, 04:23 PM


photoninator


Group: Admin
Posts: 3,253
Member No.: 1
Joined: 11-August 04



I believe the problem is that the 83 itself does NOT use 'bcall', but rather just 'call_'

Try using call_PutS instead.

It is also possible that PutS is not a valid instruction, but I am not 100% sure on that.

I do know that the 83 does NOT use bcall. So I recommend trying that first.

Edit:

I also recommend reading through http://tifreakware.net/tutorials/multi/8283portasm.htm to see the difference in setting up asm on the 83, as it is different then the 83+.
Top
contra-sh
Posted: Nov 5 2009, 05:48 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



Thanks for replying so quickly ;D

call _PutS doesn't work .
call_PutS (without space) doesn't work too...
call(_PutS) doesn't work too... (logic because not defined by equ )

So you're right, it's probably because PutS doesn't exist for 83...
Or maybe this line ?
-> #define bcall(xxxx) rst 28h \ .dw xxxx
28h is for 83+... is it the same for 83?

Just for information :
This is the value or _PutS in ti83asm.inc :

_PutS EQU 450Ah

Thank you for the help smile.gif


contra-sh

PS: If you don't know...Don't care about me, I will read the tutorial soon.
Top
contra-sh
Posted: Nov 5 2009, 06:24 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09




The first problem was that I haven't the good include file :
In the good ti83asm.inc :

_puts equ 470Dh

But allways the same error actually.

I must continue to look for another mistake...

huh.gif
Top
tifreak8x
Posted: Nov 5 2009, 08:12 PM


photoninator


Group: Admin
Posts: 3,253
Member No.: 1
Joined: 11-August 04



hmm, well, not really sure, but I will see if I can't snag one of my friends over here that is really good with ASM to look and see what he says.
Top
contra-sh
Posted: Nov 5 2009, 09:14 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



I had test a new code :

But _allways the same error :

.nolist
#define EQU .equ
#define equ .equ
#define END .end
; I drop the define b_call
#define end .end
#include "ti83asm2.inc" ;the good include this time
.list


.org $9327
menu: ld hl,$170A
ld (pencol),hl ; choose the col an row
ld hl,info1 ; copy label into hl
call _vputs ; this call is ok

; ALL SEEMS OK ... WHY IT DOESN'T WORK ON 83 ??? :'(
ret
info1: .db "hello world",$00


.end
END

If it continue, I will maybe better concentrate on learning ti83+ asm tongue.gif
lol
Top
tifreak8x
Posted: Nov 5 2009, 09:39 PM


photoninator


Group: Admin
Posts: 3,253
Member No.: 1
Joined: 11-August 04



you can't have a label and a line of code on the same line, they have to be separate I am fairly certain.
Top
contra-sh
Posted: Nov 6 2009, 07:48 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



You are probably right but I havé made this change and allways thé same error...

Thank you for your help.

contra-sh
Top
contra-sh
Posted: Nov 8 2009, 04:49 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



Does anyone have another idea??

Thank you.

contra-sh
Top
KermMartian
Posted: Nov 9 2009, 01:12 AM


Site Admin


Group: Admin
Posts: 146
Member No.: 7
Joined: 17-May 05



CODE
.nolist  ;defines, includes, and equates
#DEFINE equ .equ
#DEFINE EQU .equ
#DEFINE end .end
#include "ti83asm.inc";ROM call definitions
#include "tokens.inc";token interpretation
.list
.org 9327h                ;start address of program

menu: call _ClrLCDFull
   ld hl,$170A
   ld (pencol),hl; choose the col an row
   ld hl,info1; copy label into hl
   call _vputs; this call is ok
   ret

info1: .db "hello world",$00


The code above is correct, you shouldn't have problems with it (note the addition of tokens.inc). You do indeed need Send(9prgmNAME on the TI-83. Dan, you're allowed code on the same line as a label. If you need help faster, I am constantly on http://www.cemetech.net , but failing that, I'll try to remember to look back at this thread.
Top
contra-sh
Posted: Nov 9 2009, 11:46 AM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



Thank you KermMartian.

I'm don't understand... It doesn't work...

I've made copy paste of you code...

Downloaded another times ti83asm.inc and tokens.inc, change upper lower case for the rom call ...

Grrr

This is the code exactly the same than yours !
(juste upper case or lower case in function of my ti83asm.inc)

CODE
.nolist ;defines, includes, and equates
#DEFINE equ .equ
#DEFINE EQU .equ
#DEFINE end .end
#include "TI83ASM.INC";ROM call definitions
#include "TOKENS.INC";token interpretation
.list
.org 9327h               ;start address of program

menu: call _CLRLCDFULL
  ld hl,$170A
  ld (PENCOL),hl; choose the col an row
  ld hl,info1; copy label into hl
  call _VPUTS; this call is ok
  ret

info1: .db "hello world",$00


Don't spend time for me, I will probably continue to learn for ti83+ .

contra-sh


Top
tifreak8x
Posted: Nov 9 2009, 03:00 PM


photoninator


Group: Admin
Posts: 3,253
Member No.: 1
Joined: 11-August 04



just curious, but are you doing the

.END
.END

at the end of your program..? Or however it is supposed to be, I know it requires 2 because the assembler does something odd with just one.. *shrugs*
Top
KermMartian
Posted: Nov 9 2009, 04:29 PM


Site Admin


Group: Admin
Posts: 146
Member No.: 7
Joined: 17-May 05



QUOTE (tifreak8x @ Nov 9 2009, 03:00 PM)
just curious, but are you doing the

.END
.END

at the end of your program..? Or however it is supposed to be, I know it requires 2 because the assembler does something odd with just one.. *shrugs*

That's correct, although I usually write it as:

CODE
.end
END


(which is functionally identical to what you have). Contra, how exactly is it failing? What happens when you run the program?
Top
contra-sh
Posted: Nov 9 2009, 04:31 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



Yes I 've add this biggrin.gif

Thank you for your help.

contra-sh
Top
contra-sh
Posted: Nov 9 2009, 04:42 PM


Member


Group: Members
Posts: 12
Member No.: 7,438
Joined: 5-November 09



ERR: SYNTAX
QUIT
GOTO

I really don't understand.
On 2 different computer...
On my TI82 STATS too.

See the screenshot.

Thank you for all

Attached Image (Click thumbnail to expand)
Attached Image
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | 82/83/83+/84+ | Next Newest »


Topic OptionsPages: (2) [1] 2  add reply  new poll 




Hosted for free by InvisionFree (Terms of Use: Updated 7/7/05) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.3218 seconds | Archive
TI-Freakware's TI Ring
TI-Freakware's TI Ring
[ Join Now | Ring Hub | Random | << Prev | Next >> ]