Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - lkj

Pages: 1 2 [3] 4 5 ... 33
31
The problem here doesn't seem to be the key, though.

32
Install the Computer Link software (http://ti-pla.net/a29560) and install the OS with that.

33
Community Contests / Re: Code Golf - The Reboot #1
« on: June 01, 2015, 04:09:12 pm »
62 bytes in Python  :)

34
Calculator C / Re: Communicating between 2 nspires
« on: April 22, 2015, 04:33:31 pm »
There are some USB transfer syscalls, see http://hackspire.unsads.com/wiki/index.php/Syscalls#NavNet.

35
TI-Nspire / Re: nAssembler - Nspire on-calc assembler
« on: March 15, 2015, 02:42:51 pm »
I'm glad it works now :)

36
TI-Nspire / Re: nAssembler - Nspire on-calc assembler
« on: March 14, 2015, 04:38:19 pm »
You should always append ".tns" to the name or it won't show up in the normal file browser. I'm not sure you can run programs in Ndless Commander?

37
TI-Nspire / Re: nAssembler - Nspire on-calc assembler
« on: March 14, 2015, 08:14:55 am »
You should just open it once and quit again.
Maybe your micropython is older than the one I used to test it. In the version I use you can exit by pressing the  ESC key.
Can you try it again with the version at https://tiplanet.org/forum/archives_voir.php?id=89439?

38
TI-Nspire / Re: nAssembler - Nspire on-calc assembler
« on: March 13, 2015, 04:04:37 pm »
Have you opened micropython at least once before opening nAssembler?
Did you rename one of the files?

39
TI-Nspire / nAssembler - Nspire on-calc assembler
« on: March 11, 2015, 01:41:14 pm »
As the title suggests, this is an on-calc assembler for the Nspire :)
It's written in python, so you need micropython on your calc.
All instructions I'm aware of are supported (except CDP, LDC, STC. They are useless on the Nspire)
What's still missing are some pseudoinstructions which don't add functionality but make your life easier,
like for example automatically creating x when you write LDR R0, =x
There is also no linker or anything which means that programs are just translated to binary in the order
they are written and the first line is also the entry point.
Read the readme in the spoiler below for more details on the assembly language syntax used or look at the example.


Please report bugs, missing instructions and feature suggestions.
The code is available at https://github.com/lkjcalc/nAssembler

Download from tiplanet archives: https://tiplanet.org/forum/archives_voir.php?id=821835


Spoiler For Readme:
Usage
-----
Install micropython on your calc.
Launch the nassembler.py.tns file using micropython.
The program will ask you to specify the input file (containing the assembly source code)
and the output file (where the binary will be stored).
You have to specify the full path (for example /documents/test/clrscr.asm.tns)
If there are no errors, micropython will now tell you "Press any key to exit".
You should now see the output file after refreshing the docbrowser
(just go to the homescreen and back to the docbrowser).

Assembly language
-----------------
(Also look at the examples)
IMPORTANT (syntax is not very flexible at the moment):
-Instruction names must be preceded by whitespace
-Labels must not be preceded by any whitespace
-The instruction names and syntax are like in standard ARM assembly
(like in the official ARM online documentation)
-No automatic substitution of e.g. MVN for MOV if the immediate value can only be encoded in the inverted case
-Two operands were three are required is not allowed (no implicit destination register), e.g. "ADD r0,#28" must be written out as "ADD r0,r0,#28"

All usual instructions are supported:
ADC(S), ADD(S), AND(S), B, BIC(S), BL, BX, CLZ, CMP, CMN,
EOR(S), LDM.., LDR(B/T/BT/H/SH/SB), MCR, MLA(S), MOV(S),
MRC, MRS, MSR, MUL(S), MVN(S), ORR(S),
RSB(S), RSC(S), SBC(S), SMLAL(S), SMULL(S), STM..,
STR(B/T/BT/H), SUB(S), SVC/SWI, SWP(B), TEQ, TST, UMLAL(S), UMULL(S)

The DCD, DCDU, DCW, DCWU, DCB and ALIGN directives are supported.

The ADR pseudo instruction is now also implemented.

Some other pseudo instruction (like PUSH etc) are not implemented.
Other instructions may be missing (report if you need one).

The first line of the source is also the entry point of the program.

Numeric literals:
Prefix with 0x for hexadecimal numbers, 0 for octal, 0b for binary.
Single characters enclosed in single quotes ' are interpreted as their ascii value
You can use DCB "some string" to create a string.

Feature suggestions/Bug reports
--------------------------------------------
Here or in the following places:
Topic on tiplanet: https://tiplanet.org/forum/viewtopic.php?t=16174&p=178789
Code on github: https://github.com/lkjcalc/nAssembler

40
Humour and Jokes / Re: Important life algorithms
« on: December 24, 2014, 06:56:34 pm »
Code: [Select]
while(oreo)
    oreo--;
Looking though this again, you could optimize:
Code: [Select]
while(oreo--);
I think the compiler does that for you.

In both cases the outcome is:
while:
branch if oreo is zero: endwhile
oreo --
branch to while
endwhile:


If we're talking about C/C++, I'm pretty sure they aren't equivalent: the first version only decrements oreo to 0, the second one to -1.

41
TI-BASIC / Re: Domain error when calling from a non local area
« on: December 13, 2014, 10:29:12 am »
Shouldn't it be enough to refresh the libraries? I don't know much about TI Basic, though ;)

42
TI-Nspire / Re: TI-Nspire emulator
« on: November 14, 2014, 03:00:00 pm »
Same here. How much RAM do you have? Large or small NAND?
3GB RAM. Large or small NAND didn't make a big difference I think (didn't measure the time exactly).

Quote
That's a known bug, it's just appending the serial data to the QPlainTextEdit, '\b' and '\r' are ignored, like other ANSI escape sequences for colors.
Ah ok. Well, it's not important anyway.

43
TI-Nspire / Re: TI-Nspire emulator
« on: November 13, 2014, 05:51:22 pm »
Great! It really fixed everything, I could load a CX and a classic OS without any problems. Booting took about 2-3 minutes :)
The only thing that doesn't seem to work is the "Reset" menu entry, but that's a minor problem (actually not important at all as long as there's no input :P).
Oh, and the progress percentages are displayed after each other on a very long line instead of overwriting the old percentage as on the PC.

44
TI-Nspire / Re: TI-Nspire emulator
« on: November 13, 2014, 04:19:30 pm »
I can't think of a better solution that works in all cases...
Sounds like that was probably the problem with both errors for me, yes.
The directory is /sdcard/ on my phone instead of the /sdcard1/ in the current build, so I couldn't test if it's fixed.

45
TI-Nspire / Re: TI-Nspire emulator
« on: November 13, 2014, 01:06:54 pm »
I know, I tried to execute "r" and other commands but nothing happened. I'll try again with other CX flash images. It's strange that it seems to freeze with the CX boot1 while it just runs into an error with the classic boot1.
I'm pretty sure the flash images are correct (unless I should create them with another version of the emu on the pc side. I'm using the one from the latest prebuilt ndless sdk).
I have android 4.4.2 on my phone. It has a normal armv7 processor and much more RAM than needed.

Pages: 1 2 [3] 4 5 ... 33