.nolist
#include "ti83plus.inc"
.org userMem-2
.db $BB,$6D
.list
bcall(_RclAns)
bcall(_ConvOp1)
ld a,e
or a
jr z,Install_Interrupt
dec a
ret nz
Uninstall_Interrupt:
im 1
ret
Install_Interrupt:
di
ld hl,$9900
ld de,$9901
ld bc,256
ld (hl),$9a
ldir
ld hl,interrupt_start
ld de,$9a9a
ld bc,interrupt_end-interrupt_start
ldir
ld a,$99
ld i,a
im 2 ;switch to mode 2
ei ;enable interrupts
ret
Interrupt_Start:
ex af,af'
exx
in a,($03)
and %11111110
out ($03),a
call $003A
reti
Interrupt_End:
.end
That is written in assembly.
can I do this on my TI-83+?
If it is in a program on your calculator, you can run it with Asm(prgmPROGRAM).
If you are wanting to write an assembly program, you need a computer and an assembler. You will also need TI-Connect to transfer the program.
Wouldn't it say "Bad Token!"? If it has a bunch of "garbage characters"?
I used to have programs like these with this error…
GatoradeDC, if you know how to program in hexadecimal, you can do the same thing for this program (in hex, not system language).
If I understand correctly from my sources, I believe that is the assembly source code for the program prgmONBLOCK. If you want to avoid the "Bad Token!" error, convert this to hexadecimal, so it will not read it as invalid tokens.
Hewwo, my name is Achak Claw. I was formerly BioHazard.
It is Zilog Z80 Assembly. Many machines can execute Z80 assembly code, but this one is written specifically for the TI-83+ line, hence the "#include "ti83plus.inc"" at the top.
The "Zilog" part refers to the company that made the CPU architecture. The "Z80" part is the actual name of the CPU architecture. There is no single "assembly language". Assembly code is a family of programming languages which is used to represent machine code (numbers) that the CPU understands in a more human-readable fashion.
For example, the numbers "66,10,0" tells the CPU to load the number "10" into the HL register. This is pretty hard for a human to read, so instead Z80 assembly lets you simply write "LD HL, 10", and then it will convert that code into our numbers "66,10,0" when you "assemble" or "compile" the code.
For different CPUs, you have drastically different machine code, and thus completely different assembly languages for them. Most modern desktops use x86_64 assembly, things like the 3DS and Raspberry Pi use ARM assembly. Although, your code also changes quite a bit depending on your operating system. The assembly code for a Windows PC will be quite a bit different than that same PC running Linux instead.
You actually don't need a desktop computer to write Z80 assembly code. The TI-83+ line has an assembler called Mimas that runs on the calculator itself and that I've used a lot. Pair that with the external keyboard and the composite video out box, and it's pretty comfortable to program that way. The calculator also has a built-in "AsmComp(" routine, but that's for hex codes, which is moreso just machine code written in hexadecimal and isn't really assembly.
As for writing code on the computer, I'd highly recommend SPASM-NG. This is a great cross-platform assembler that can build Z80 code directly to a TI-83+ file, so it can easily be transferred to the TI-83+ and executed. It also supports eZ80 assembly code, which is what the TI-84+CE understands.
You can go to places like WikiTI, z80 Heaven, and Cemetech to learn Z80 coding for the TI-83+ line. But a lot of machines can run Z80 code just as long as they have a Z80 CPU. Most from the early 80s, like the TRS80 and ZX Spectrum home computers. Not many modern machines run Z80 code besides the TI-83+ line of calculators. Although HAL Laboratory did recently just release a Z80 computer, but it actually uses an ARM chip and does Z80 through emulation.
If you're coding Z80 on a different machine, the code will have to be different due to the machines having different hardware and software layouts.
Could you provide the .zip file in the archives?
Hewwo, my name is Achak Claw. I was formerly BioHazard.