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 - Xeda112358

Pages: 1 ... 24 25 [26] 27 28 ... 317
376
TI Z80 / Re: Floatlib
« on: May 17, 2016, 07:17:44 pm »
Is there any program to turn hex codes to asm code?
It is called a disassembler, and I'm sure there are, but I don't know any off the top of my head. If possible, I suggest looking directly at the source code (usually included with any program). A disassembler can only give generic label names, can't preserve macros, and it will convert all of the data to code, too, which gets pretty confusing for somebody with experience, let alone without it.

The program works! (what is the address of the screen?)
I'm not quite sure what you mean. The OS uses plotSScreen to store a copy of the graph screen data. If you do something like this, you might see what is going on:
Code: [Select]
    ld hl,plotSScreen
    ld a,%01010101
    ld b,3
loop:
    ld (hl),a
    inc hl
    djnz loop
    bcall(_GrBufCpy)
    ret


As a side note, I couldn't figure out the format for Mimas header files, so I've been manually typing in the data in Mimas. It's slow going. For now, if you have Floatlib on your calc, try this Mimas program:
Code: [Select]
    ORG userMem-2
    DB $BB,$6D
Start:
    ld hl,appname
    rst rMov9ToOP1
    bcall FindApp
    ret c
    ld b,a
    in a,(6)
    push af
    ld a,b
    out (6),a
    call START
    pop af
    out (6),a
    ret
appname:
    DB 14H
    DB "Floatlib"
START:
iconstSingle=4024H
addSingle=402AH
single2str=407EH
scrap=8000H
var=scrap+30
_pi=0
_e=1
    call iconstSingle
    DB _pi
    ex de,hl
    DB _e
    ld bc,var
    call addSingle
    ld h,b
    ld l,c
    ld bc,scrap
    call single2str
    ld h,b
    ld l,c
    bcall PutS
    ret
It's a lot, but it's mostly just the header, then the actual code. If you do happen to get that code working, you can try other constants instead of _e and _pi (listed in the docs/floatlib.inc file in the Floatlib download) as well as different operations than just addSingle. They are also all listed in the Floatlib App (just run it on the calc and go into the various menus), but that could get annoying switching back and forth between apps.

377
TI Z80 / Re: Floatlib
« on: May 17, 2016, 05:21:51 pm »
When you are learning assembly, it comes in layers. Trying to understand a code that offers high-level functionality is going to take experience.

I suggest you play with it first. Check out the first few codes here and try them out on your calculator. To help a bit, the Invert code can be broken down as:


  AsmPrgm210000115F3FEF5F4DC9
=>AsmPrgm210000115F3FEF5F4DC9

The stuff in RED is an X-coordinate (the first one must NOT be bigger than the second, else it will crash).
The stuff in BLUE is a Y-coordinate (the first one must NOT be bigger than the second, else it will crash).

In source code format, this would be:

    ld hl,$0000
    ld de,$3F5F
    bcall(_InvertRect)
    ret

Alternatively, you could do the following, which is equivalent, but larger and slightly slower:

    ld h,$00
    ld l,$00
    ld d,$3F
    ld e,5F
    bcall(_InvertRect)
    ret

Which in hexadecimal is:

AsmPrgm26002E0016001E00EF5F4DC9

You can swap the order of the loads (so like ld de,$3F5F \ ld hl,0) but those all need to be done before calling the system routine as these are its arguments.

378
TI Z80 / Re: Floatlib
« on: May 17, 2016, 04:46:26 pm »
I started to figure out assembly after about 1.5 years of programming my calculator.
I will see if I can do anything with Mimas to add support for Floatlib. I didn't know it was updated (I have an older version).

379
TI Z80 / Re: Floatlib
« on: May 17, 2016, 04:20:38 pm »
It can definitely work with Axe, but you would need to do a lot of the coding in assembly. That said, the app has a built-in reference sheet for the necessary header and addresses of the routines. I'm not familiar with how to make axioms, unfortunately.

380
TI Z80 / Floatlib
« on: May 14, 2016, 06:44:13 pm »
EDIT 14 January 2019 : I put this project up on GitHub (Floatlib), incorporating the z80float library that I have been updating and fixing and adding to. Floatlib now has extended-precision support as well as a more complete library of single-precision float routines!

I made a cute little app for my calc that I thought I would share! It basically puts all of my single-precision floats into one app and provides a somewhat easy way to access the routines through a jump table.

It even features an in-app reference for the routines which is useful for when I'm programming on my calc, as well as a hexadecimal translation of the header just in case I forget the code.

I included two examples. The first simply computes and displays eπ. The second uses an algorithm similar to that of the Arithmetic-Geometric Mean algorithm to compute arctangent. It takes the input number as a string in Ans.

Warning: I've run into a few bugs (some are documented, others I haven't chased down yet). Pro-tip: Don't store your program variables in the range of scrap to about scrap+30. The default value for scrap is 8000h. If you change this, please note that the app expects the scrap region to be 256 bytes.

381
TI Z80 / Re: Danger zone
« on: May 10, 2016, 07:25:18 pm »
Under normal use, the flash (archive) cannot be edited. While the OS has access to the functions and privileges to write to flash, it requires some very specific exploits to unlock it for user use. The possibility of accidentally unlocking flash is astronomically low.

So in other words, you may erase RAM frequently, Flash+RAM (very infrequently, even when I was putting in semi-random stuff I never had the problem), and I think that unless you somehow unlock flash, it's impossible to brick your calc with code.

382
TI Z80 / Re: ICE - an interpreter/compiler of CE-BASIC
« on: March 31, 2016, 09:34:41 am »
I would do something like:
Code: [Select]
or a \ jr z,$+4 \ xor a \ or b
It returns the z flag set (z) if one or both are zero, else it returns (nz) if both are non-zero.

383
ASM / Re: [help] App Signing, SPASM
« on: March 29, 2016, 07:26:19 am »
Thank's, I'll give it a try when I get a moment!

384
TI Z80 / Re: ICE - an interpreter/compiler of CE-BASIC
« on: March 26, 2016, 05:44:58 pm »
Sounds pretty snazzy, good luck!

385
Axe / Re: Running Basic Programs in Axe
« on: March 22, 2016, 06:59:44 pm »
Oops, sorry. Somehow I forgot the '8' :S
(I edited the post with the code).

386
TI Z80 / Re: AxeIDE
« on: March 17, 2016, 08:39:42 am »
So is this program an editor made in Axe, or made in assembly for Axe?
I may or may not be working on a general-purpose IDE in assembly atm with the help of a few other coders.

387
Introduce Yourself! / Re: Hello again?
« on: March 17, 2016, 08:27:47 am »
Weclome to Omni. Hev some peanuts.

!peanuts

388
Axe / Re: Running Basic Programs in Axe
« on: March 15, 2016, 04:54:31 pm »
You cannot disable APD in BASIC, however, APD only happens with the functions Input, Pause, and Menu( (I may have missed something). In Axe, I think this should do the trick:
Code: [Select]
Asm(FDCB0896)

389
TI Z80 / Re: Balltrix - z80 ASM Remake
« on: March 15, 2016, 04:41:31 pm »
Okay, update time! I overhauled the highscore input menu so you can enter stuff as you would on the homescreen (pressing the sin( button prints sin(, etc.). I, and at least one other person found the score being erased and redrawn to the display to be annoying (the blink every time the screen is rerendered). I fixed that and instead replaced the top row of 6 pixels with the score and a note: "(ported by Zeda)" which I might change later.

This is probably about as much as this version will change unless there are serious bugs. For example, DJ Omnimaga reported issues with graphics emulation in WabbitEmu, but not Tilem. I also had no problems with Tilem or my physical calc.

390
Axe / Re: Running Basic Programs in Axe
« on: March 10, 2016, 06:01:59 pm »
It's pronounced like 'Ask'   :devil:

Spoiler For Spoiler:
Runer112 says I can't intentionally spread misinformation :( Yes, it is pronounced like "ax" :P

Pages: 1 ... 24 25 [26] 27 28 ... 317