Author Topic: Status of Nspire programming?  (Read 8669 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Status of Nspire programming?
« Reply #15 on: July 17, 2010, 02:37:29 pm »
I do not exactly remember when, but I had a small discussion about this with TD-Linux in #omnimaga recently, and it seems to be effectively due to the z80 processor being too limited for a language like C. Something to do with not having enough registers.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Tribal

  • The Fallen
  • LV5 Advanced (Next: 300)
  • *
  • Posts: 218
  • Rating: +15/-1
    • View Profile
Re: Status of Nspire programming?
« Reply #16 on: July 17, 2010, 08:50:31 pm »
Yeah, it's a register issue. IIRC the z80 proccessor has 14 general purpose registers while the ARM one in the nspire has 37(?) registers, if the documentation I was reading is correct.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Status of Nspire programming?
« Reply #17 on: July 17, 2010, 11:34:46 pm »
Didn't some of the z80 registers also required the combination of two registers?
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Tribal

  • The Fallen
  • LV5 Advanced (Next: 300)
  • *
  • Posts: 218
  • Rating: +15/-1
    • View Profile
Re: Status of Nspire programming?
« Reply #18 on: July 18, 2010, 12:49:40 am »
By 'combining' registers it allows for storage of 16-bit data, but alone they can only hold 8-bits of data.  So AF, BC, DE, HL, IX, IY, and SP can hold up to 16-bits of data(I believe).  But IX, IY, and SP are reserved for the OS or something and shouldn't be modified.

I may not totally sure about IX, IY, and SP, I know that SP is the stack pointer, but I am not entirely sure what IX and IY are for. Maybe someone with more knowledge could enlighten us since I only know some basic stuff :D

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Status of Nspire programming?
« Reply #19 on: July 18, 2010, 02:42:52 am »
The x86 ISA doesn't have much more register than the Z80 ISA has.

ARM processors have 16 registers usable for general-purpose code, plus some more control registers.
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: Status of Nspire programming?
« Reply #20 on: July 18, 2010, 08:01:37 pm »
Only IY is used by the OS, and SP is used pretty much everywhere (you need to preserve SP to use call, ret, push, and pop)
IY is actually the start of the OS flags, so you can use it by disabling interrupts then restoring it when done.
IX can be used by programs, and along with IY is an index register. They're called that because when using them indirectly, you can add a constant index (8-bit signed) to them, like "res 3,(ix+9)", which resets the third bit of the byte nine after IX.
The disadvantage to using them is that they are larger and slower. The instruction above is 4 bytes, while "res 3,(hl)", the equivalent version with hl instead of ix+9, is only 2.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.