π
<-

nAssembler

C, C++, ASM...

Re: nAssembler

Unread postby lkj » 26 Jan 2017, 02:07

Thank you.

Le programme de grosged n'arrive pas à être compilé par ton utilitaire, et donc, il faudrait peut-être que tu regardes:
Le lien : viewtopic.php?f=20&t=18830

Ok, I looked at it. I had to fix a bug with binary literals. Apart from that it was just different syntax and some unsuported abbreviations:
Most notably, there is no automatic substitution of e.g. "MVN r0,0xF000000F" for "MOV r0,0x0FFFFFF0" - it will just give an error that the immediate value cannot be encoded.
Also, for instructions with three operands, the destination cannot be ommitted to be implicitly the same as the second operand. For example no "ADD r0,r0", it needs to be "ADD r0,r0,r0".

Et aussi, rajouter la possibilité de faire bl 826e par exemple, pour appeler directement une adresse, parce que sinon, je ne vois pas comment faire appelle aux fonctions déjà existante, comme afficher des caractères à l'écran ;)

BL 826e is not possible for me to implement: the assembler needs to know the offset, but it cannot know at which address the program will be loaded. You can instead store 0x826e in r0 and then "BLX r0" to get the effect you want.

I uploaded the fixed nAssembler at http://ti-pla.net/a821835.
User avatar
lkjProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 76%
 
Posts: 13
Joined: 30 Oct 2012, 00:25
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: nAssembler

Unread postby mdr1 » 26 Jan 2017, 07:41

lkj wrote:BL 826e is not possible for me to implement: the assembler needs to know the offset, but it cannot know at which address the program will be loaded. You can instead store 0x826e in r0 and then "BLX r0" to get the effect you want.

Well, in theory you could include at the beginning of the generated program a linkage system. :D
Image ImageImage
User avatar
mdr1Premium
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 44%
 
Posts: 1083
Images: 12
Joined: 28 Mar 2011, 00:00
Gender: Not specified
Calculator(s):
MyCalcs profile
Class: Je voyage toujours en première.

Re: nAssembler

Unread postby Ti64CLi++ » 26 Jan 2017, 09:42

Thank you for update lkj :)
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

Re: nAssembler

Unread postby grosged » 26 Jan 2017, 10:49

:~o Thanks a lot for updating nAssembler, lkj :D
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: nAssembler

Unread postby Ti64CLi++ » 29 Jan 2017, 19:03

Code: Select all
MOV r0,#0xE26F
BL r0

This code doesn't work :(
An error occurred on BL r0 :(
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

Re: nAssembler

Unread postby lkj » 31 Jan 2017, 00:15

Ti64CLi++ wrote:
Code: Select all
MOV r0,#0xE26F
BL r0

This code doesn't work :(
An error occurred on BL r0 :(


Yes, you need BLX. BL can only branch to a label (internally an offset from the current PC value). BLX branches to a register-specified destination address.
User avatar
lkjProgrammeur
Niveau 3: MH (Membre Habitué)
Niveau 3: MH (Membre Habitué)
Level up: 76%
 
Posts: 13
Joined: 30 Oct 2012, 00:25
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: nAssembler

Unread postby Ti64CLi++ » 31 Jan 2017, 13:08

Oh, sorry, thanks ;)
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

Re: nAssembler

Unread postby grosged » 31 Jan 2017, 16:26

lkj, do you intend to implement DCW for declaring 16 bit values, and pseudo-instructions like ADR and LDR Rn,=#..?
I wish I could help , but I do know nothing about programming in python.
User avatar
grosgedVIP++
Niveau 14: CI (Calculateur de l'Infini)
Niveau 14: CI (Calculateur de l'Infini)
Level up: 30.2%
 
Posts: 770
Images: 75
Joined: 14 Sep 2011, 12:29
Gender: Not specified
Calculator(s):
MyCalcs profile

Re: nAssembler

Unread postby Ti64CLi++ » 31 Jan 2017, 17:10

@gorsged il faut que tu rajoutes le graphisme dans ton tuto sur l'ASM avec l'ARM9 de la Nspire, je fais un peu à l'aveugle, donc, ce serait pratique ;)
Last edited by Ti64CLi++ on 31 Jan 2017, 17:27, edited 1 time in total.
Image
User avatar
Ti64CLi++Modo
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 32.5%
 
Posts: 3446
Images: 75
Joined: 04 Jul 2014, 14:40
Location: Clermont-Ferrand 63
Gender: Male
Calculator(s):
MyCalcs profile
Class: ENS Rennes
GitHub: Ti64CLi

Re: nAssembler

Unread postby Adriweb » 31 Jan 2017, 17:27

"graphismes", c'est en gros taper dans le buffer d'écran au bon endroit, quoi.
Après, tu peux te faire des routines pour rendre les choses plus pratique en fonction de la tâche...

MyCalcs: Help the community's calculator documentations by filling out your calculators info!
MyCalcs: Aidez la communauté à documenter les calculatrices en donnant des infos sur vos calculatrices !
Inspired-Lua.org: All about TI-Nspire Lua programming (tutorials, wiki/docs...)
My calculator programs
Mes programmes pour calculatrices
User avatar
AdriwebAdmin
Niveau 16: CC2 (Commandeur des Calculatrices)
Niveau 16: CC2 (Commandeur des Calculatrices)
Level up: 79.7%
 
Posts: 14820
Images: 1131
Joined: 01 Jun 2007, 00:00
Location: France
Gender: Male
Calculator(s):
MyCalcs profile
Twitter: adriweb
GitHub: adriweb

PreviousNext

Return to Native: Ndless, Linux, ...

Who is online

Users browsing this forum: ClaudeBot [spider] and 1 guest

-
Search
-
Social TI-Planet
-
Featured topics
Comparaisons des meilleurs prix pour acheter sa calculatrice !
"1 calculatrice pour tous", le programme solidaire de Texas Instruments. Reçois gratuitement et sans aucune obligation d'achat, 5 calculatrices couleur programmables en Python à donner aux élèves les plus nécessiteux de ton lycée. Tu peux recevoir au choix 5 TI-82 Advanced Edition Python ou bien 5 TI-83 Premium CE Edition Python.
Enseignant(e), reçois gratuitement 1 exemplaire de test de la TI-82 Advanced Edition Python. À demander d'ici le 31 décembre 2024.
Aidez la communauté à documenter les révisions matérielles en listant vos calculatrices graphiques !
1234
-
Donations / Premium
For more contests, prizes, reviews, helping us pay the server and domains...
Donate
Discover the the advantages of a donor account !
JoinRejoignez the donors and/or premium!les donateurs et/ou premium !


Partner and ad
Notre partenaire Jarrety Calculatrices à acheter chez Calcuso
-
Stats.
979 utilisateurs:
>962 invités
>11 membres
>6 robots
Record simultané (sur 6 mois):
6892 utilisateurs (le 07/06/2017)
-
Other interesting websites
Texas Instruments Education
Global | France
 (English / Français)
Banque de programmes TI
ticalc.org
 (English)
La communauté TI-82
tout82.free.fr
 (Français)