0 Members and 4 Guests are viewing this topic.
I didn't know anyone ever used this, so I didn't continue work on it What useful features are missing in your opinion?
Hi ikj,may be there are some things missing, that only few people shows interest to your assembler. Some points:-installing should be easy. In the text file its explained, but not every beginner is able to work with it. A step by step describing would be better and it should content every step, also installing ndless and microphyton and pyWrite or another editor. Should folders me made? Which and where? For example, it's not clear in the beginning, that files have to be put in an ndless folder at root. For example, I didnt get the nassembler to work up to now (already asking vogtinator about this).Am using a nspire cx cas,using os 4.4,installed ndless 4.4,started micropython (134/146) one time, as its told,started nassembler but get error abour file format not supported.May be that and the not so clear installation info hinders some interested people to try it.Some simple lessons how to make the first short programs would be very helpful, some example programs you have already in your zip. If you like I can give some more hints to that point.cuklaus
It's working now, was a simple mistake I made: for testing micropython 134 and 146 I did rename the both files (micropython 134 for example). So the .py files couldn't get connected and also nAssembler didn't run. Now everthing works.
There has recently been some activity in the thread on tiplanet, and as a result I also made some updates, adding CLZ, ADR, and fixing a bug. I forgot to update the file in the first post, so now I removed it and added a link to the download on tiplanet, which should always be up to date.
I'm glad that it works now. Thanks for your many comments. I'm going to reply to some of their concerns below.
I agree that more documentation, more examples and some explanations of the examples would help. But my main reasons for starting this project were that I was interested in writing an assembler, had a lot of time with nothing to do, and I was always a bit annoyed that it was impossible to write native programs for the Nspire on-calc. Nowadays, I don't have much time, and I've accomplished my main goal of writing an on-calc assembler with most of the useful features.
I may try to write another example or two, but for more, other people will have to do it. So, you're welcome to do it
There probably already are some ARM assembler tutorials on the internet, for example for the GBA, but they can't explain the things specific to the Nspire, e.g. how to read the keyboard or display stuff (see https://hackspire.org and in particular https://hackspire.org/index.php/Memory-mapped_I/O_ports for that kind of thing), and they probably use some pseudo-instructions I didn't implement or some different syntax, which will require some experimenting and/or googling to adapt to nAssembler.
Also, grosged over on tiplanet wrote a small demo and a short explanation of ARM assembly, but it's in French. (example link: https://tiplanet.org/forum/archives_voir.php?id=839558, the file nsprtest.s is the code compatible with nAssembler)
I wrote about making the handling of nAssembler easier-so I tried by myself. But without being used in python I had no success. Was changing your code a little bit (yes, I know, it's a sacrileg), so that not the path but only the file name must be entered or in the other version path & filename get fixed to get a quick turnaround:when I change your code at the end of the nassembler filedef calc_assemble(): inf = input('in:') outf = input('out:') return assembler(inf, outf)todef calc_assemble(): inf = /documents/ndless/example.asm.tns outf = /documents/ndless/example.prg.tns return assembler(inf, outf)ordef calc_assemble(): inf = /documents/ndless/ inf = inf + input('in:') outf = /documents/ndless/ outf = outf + input('out:') return assembler(inf, outf)all that doen't work, I get the 'File "/documents/ndless/nAssembler.py.tns", line 1600 Syntax Error: invalid Syntax. Tried also backslash for slashes but same reaction. Am wondering why I see 'nAssembler.py.tns' at the end of the string and not 'Example.asm.tns' as i wrote.
About the system calls: Yes, I guess it would be useful to have some way to access them with nAssembler. In programs compiled on the pc, ndless provides them.Since neither reading keypad state nor displaying stuff on the screen uses them, you can actually already do many things without them, but there's obviously no file reading/writing..word is just called dcd here.
So it seems there is no os reassemble listing (with some comments)? Ok, in those days when we got such a book for the speccy it were 16 kb of rom. So making such a thing for the now 13 mb that the os contents would be an endless work. If there comes no infos from TI it may be to timesucking, esp. for a single person.But when ndless contents some system calls, their programmers must know about them. However, they won't shout around with this knowledge that they got surely not without some trouble.
main stmfd sp!, {r0-r12, lr} adr r0, text swi #22 bl wait ldmfd sp!, {r0-r12, pc}wait stmfd sp!, {r0-r12, lr} mvn r0, #0 mov r0, r0, lsr #4waitloop sub r0, r0, #1 cmp r0, #0 bgt waitloop ldmfd sp!, {r0-r12, pc}text dcb "Hello World!"