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

Pages: 1 ... 30 31 [32] 33 34 ... 38
466
Other Calc-Related Projects and Ideas / Re: TiLP Portable?
« on: April 11, 2011, 06:38:34 pm »
Does TILP not use user-mode drivers? Those don't need administrative rights to be used.

467
TI Z80 / Re: zStart - an app that runs on ram clears
« on: April 10, 2011, 09:17:15 pm »
Oh, wow, Axe actually does rename them, but only from within the Program editor.

468
TI Z80 / Re: zStart - an app that runs on ram clears
« on: April 10, 2011, 07:47:53 pm »
I like the idea of being able to rename tokens. Axe re-purposes a lot of tokens, and so do Axioms.

469
The Axe Parser Project / Re: Features Wishlist
« on: April 10, 2011, 07:38:39 pm »
Here's a slightly easier way that might be less compatible with shells:
Code: [Select]
Asm(2ADE86 2B 2B F9 C9)You don't need to place any special code at the start of the program.

It uses the fact that the OS (and probably all shells) always wraps programs in an error handler when it runs them. So if any shells don't do that, or place any extra pushes on the stack before running the program, it'll crash. But all shells have to use an error handler, or else an error will quit the shell itself.
Spoiler For Actual assembly code:
Code: [Select]
ld hl, (86DEh) ; This address is how the OS always knows how to restore the stack with APP_POP_ERR
dec hl
dec hl
ld sp, hl
ret

Really late edit: That will also have problems if your program installs an error handler of its own, so be sure to pop off any error handlers you have installed before running that. It will also have problems if you modify port 6, so you must restore its value before running that code.

470
TI Z80 / Re: zStart - an app that runs on ram clears
« on: April 10, 2011, 07:26:12 pm »
Request: Safe ram clear.
You would have an option to Archive all unarchived:
*Programs
*Variables
*Appvars
*Etc.

After that, it would clear you ram and Unarchive the things that were just archived. [/ridiculous but awesome idea]
2nd > Mem > Group > New Group > enter name > All+

There's an app that lets you make macros if you want it fast.

471
General Calculator Help / Re: Give a summary of RAM?
« on: April 10, 2011, 06:54:19 pm »
The TI-83+SE is much more like the TI-84+SE than the TI-83+. It was like a beta version of the TI-84+SE. It has the full 128 K of RAM, the faster CPU, the crystal timers, and most of the extra ports. The only thing it's missing is the USB hardware and RTC.

Oh, yeah, so read this:
(20:56:21) DrDnar: Ah ha, assuming you don't use the crypto or small edit buffer bcalls, there's over 512 bytes free at 8000h.
(21:03:53) DrDnar: The TIOS programmers were nothing if not generous in reserving memory for OS use.
(21:05:47) DrDnar: BrandonW: Is the area marked smallEditRAM entirely free?
(21:06:15) BrandonW: There's actually 1087 bytes free if you rebuild the app base page table when done.
(21:06:38) DrDnar: Contiguous?
(21:06:59) DrDnar: I assume there's a bcall to rebuild the app base page table.
(21:07:18) BrandonW: Yes, and the BCALL is 5011h.
(21:07:22) BrandonW: I called it _FillBasePageTable.
(21:07:50) BrandonW: And yeah, it's free if there's no small edit buffer going on, such as when TRACEing.
(21:08:48) DrDnar: Well, between appBackupScreen, saveSScreen, graphScreen or whatever, and the 8000h area, there's more than enough free RAM for dynamic four-level grayscale.
(21:10:15) DrDnar: The bottom line is, there's craploads of free RAM available for use if you know where to look.

472
The Axe Parser Project / Re: Features Wishlist
« on: April 10, 2011, 06:40:06 pm »
A way to Exit the program from within a subroutine, because both Return and goto end-of-program just end the subroutine.

There's no real command to do that in ASM either. In fact, you could think of the program itself as a big subroutine that calls smaller subroutines. There's are JForce bcalls in ASM, but they leave an extra copy of the program in RAM, causing a memory leak.
There are several work-arounds. You can, for example, use DeleteMem on 9D93h and then JForce your way out of the program. (The program's size is stored in 89ECh.) The easiest way to exit an assembly program at any time is to start the program with
Code: [Select]
pop hl
ld (returnAddress), hl
and then quit with
Code: [Select]
ld hl, (returnAddress)
jp (hl)
For this, stack level doesn't matter because the OS always wraps assembly code with an error handler; error handlers restore the stack when an error is thrown or you remove the handler. (Hopefully, all shells do something similar, too.) There's a specific memory address (86DEh) in which the OS stores the stack value of the most recent error handler, so you could also read that address, and then subtract the proper offset from it to get the address on the stack where the return address is stored. Of course, just throwing any error is a valid way to quit any assembly program.

EDIT: So, somebody already posted an Asm( string to quit at any time. I meant this more for Quigibo than end-users, as I think there should be an official way to quit at any time.

473
General Calculator Help / Re: Weird Home Screen Glitch
« on: April 10, 2011, 06:22:18 pm »
Mathprint has a lot of really odd glitches. On my unit, if you nested about a dozen levels of parentheses, it would crash. I could never duplicate it in Wabbitemu, even after I loaded a full ROM dump.

474
Axe / Re: Quick question about archived programs' VAT entries
« on: April 09, 2011, 02:39:23 am »
I'm not sure what he needs, then, as Axe's file thing seems to allow reading data from the archive as-needed.

On another note, here's an untested B_CALL Axiom:
Code: [Select]
; B_CALL Axiom
; expr(RegisterBlock, BCallAddress)
; Calls the B_CALL. The data at RegisterBlock is loaded into the registers, and
; the register values returned by the B_CALL are written to RegisterBlock
; RegisterBlock should have the variables in the following order:
;  - If treating all as 16-bit values: AF BC DE HL
;  - If working with individual bytes: FA CB ED LH
; IMPORTANT: REGISTERBLOCK MUST POINT TO THE END OF THE REGISTER BLOCK, NOT THE
; START
; This uses self-modifing code, so cannot be used from an application.
.dw wrapBCALLEnd-wrapBCALL
.db 0Fh
.db t2ByteTok, tExpr
.db 1 ; A subroutine, because B_CALLs aren't fast and might as
.db 2 ; well save space
; I haven't done any calculations on whether this is remotely optimal.
wrapBCALL:
; Write B_CALL address
.db 7Fh ; Escape load operation
ld de, wrapSysCall
ld a, l
ld (de), a
inc de
ld a, h
ld (de), a
; Move stack stuff
pop de
pop hl
push de
; Now HL has the address of the data block
ld a, i ; Save interrupt state
push af
di ; Use SP to load values
ld (0FE70h), sp ; Replace with 9311h or any other obsecure memory area if desired
ld sp, hl
pop af
pop bc
pop de
pop hl
ld (0FE6Eh), sp
ld sp, (0FE70h)
; Perform actual B_CALL
rst 28h
wrapSysCall:
.dw 0
di ; Some B_CALLs DO mess with interrupts
; Save values using SP
ld sp, (0FE6Eh)
push hl
push de
push bc
push af
ld sp, (0FE70h)
pop af
ret po
ei
ret
wrapBCALLEnd:

475
Axe / Re: Quick question about archived programs' VAT entries
« on: April 08, 2011, 06:06:29 pm »
Quote
getCalc(PTR): Finds the object who's name is pointed to and returns a pointer to the start of its data, or zero if it was archived or not found.
According to this documentation, it doesn't return the variable's address if it is archived, and doesn't return the page, ever. So it would be useless if you want to read data from the archive.

I won't be here tomorrow, and probably not tonight, so here's what I have. You should be able to save this as a file and assemble it Spasm. You just need to provide tokens for it to use.
Code: [Select]
.nolist
#include "ti83plus.inc"
.list
.org 0h

.dw 0C0DEh

wrapFlashToRam:
; FlashToRam(Page, Address, Destination, Length)
; Block copies Length data from Page:Address to Destination.  Automatically
; wraps to the next page as-needed.
; Inputs:
;  - Page, Address: Source
;  - Destination: Pointer to location to copy the data
;  - Length: Amount of data to copy
.dw wrapFlashToRamEnd-wrapFlashToRam ; Size
.db 1Fh ; Compatible with everything
.db what, ever ; Token
.db 1 ; Type (subroutine, regular)
.db 4 ; Arguments
ld c, l
ld b, h
pop ix
pop de
pop hl
pop af
push ix
rst 28h
.dw _FlashToRam
ret
wrapFlashToRamEnd:


; No .org is required because this contains no absolute pointers.
wrapChkFindSym:
; ChkFindSym(PointerToDestination, PointerToName)
; Returns information about a variable.
; Inputs:
;  - PointerToDestination: Location to write information struct to
;    This struct has the form
;        variableStruct {byte type; byte page; word location; word VATLocation};
;  - PointerToName: Pointer to name.  The type must be the byte before the name,
;    and the name must be terminated with a 0 if less than eight characters.
; Output:
;  - Data written on success, unchanged on failure
;  - Returns 1 on failure, 0 on success
.dw wrapChkFindSymEnd-wrapChkFindSym ; Size
.db 1Fh ; Compatible with everything
.db what, ever ; Token
.db 1 ; Type (subroutine, regular)
.db 2 ; Arguments
; Swap return address with destination pointer
pop bc
pop de
push bc
push de
; Call
rst 20h ; Mov9ToOP1
rst 28h
.dw _ChkFindSym
; Check for failure
pop ix
jr c, +_
ld hl, 1
ret
_: ; Success!
and 1Fh
ld (ix+0), a ; I'm too lazy to deal with all the register
ld (ix+1), b ; swapping
ld (ix+2), e
ld (ix+3), d
ld (ix+4), l
ld (ix+5), h
ld hl, 0
ret
wrapChkFindSym:


wrapLoadCIndPaged:
; LoadCIndPaged(Page, Address)
; Reads a single byte from Page:Address.
; Inputs:
;  - Page: Page to read from
;  - Address: Offset to read from
; Output:
;  - Data byte
.dw wrapLoadCIndPagedEnd-wrapLoadCIndPaged ; Size
.db 1Fh ; Compatible with everything
.db ; Token
.db 1 ; Type (subroutine, regular)
.db 2 ; Arguments
pop bc
pop de
push bc
ld b, e
rst 28h
.dw _LoadCIndPaged
ld h, 0
ld l, c
ret
wrapLoadCIndPaged:


; LoadDEIndPaged(Page, Address)
; Reads a word from Page:Address.
; Inputs:
;  - Page: Page to read from
;  - Address: Offset to read from
; Output:
;  - Data word
.dw wrapLoadDEIndPagedEnd-wrapLoadDEIndPaged ; Size
.db 1Fh ; Compatible with everything
.db ; Token
.db 1 ; Type (subroutine, regular)
.db 2 ; Arguments
pop bc
pop de
push bc
ld b, e
rst 28h
.dw _LoadCIndPaged
ex de, hl
ret
wrapLoadDEIndPaged:
.dw 0

476
Axe / Re: Quick question about archived programs' VAT entries
« on: April 08, 2011, 03:59:28 pm »
I'm writing the axiom now. Axe Parser should really add native B_CALL support. Perhaps you could use a bitmap for telling the parser what registers to use as input and output.

By the way, what exactly does the size field measure? The following is an example of what I have. Is the size field specified correctly here?
Code: [Select]
; No .org is required because this contains no absolute pointers.
wrapChkFindSym:
; ChkFindSym(PointerToDestination, PointerToName)
; Inputs:
;  - PointerToDestination: Location to write information struct to
;    This struct has the form
;        variableStruct {byte type; byte page; word location; word VATLocation};
;  - PointerToName: Pointer to name.  The type must be the byte before the name,
;    and the name must be terminated with a 0 if less than eight characters.
; Output:
;  - Data written on success, unchanged on failure
;  - Returns 1 on failure, 0 on success
.dw wrapChkFindSymEnd-wrapChkFindSym ; Size
.db 1Fh ; Compatible with everything
.db what, ever ; Token
.db 1 ; Type (subroutine, regular)
.db 2 ; Arguments
pop bc
pop de
push bc
push de
rst 20h ; Mov9ToOP1
rst 28h
.dw _ChkFindSym
pop ix
jr c, +_
ld hl, 1
ret
_: and 1Fh
ld (ix+0), a ; I'm too lazy to deal with all the register
ld (ix+1), b ; swapping
ld (ix+2), e
ld (ix+3), d
ld (ix+4), l
ld (ix+5), h
ld hl, 0
ret
wrapChkFindSym:

477
Axe / Re: Quick question about archived programs' VAT entries
« on: April 08, 2011, 02:55:13 pm »
Is there not a B_CALL axiom? Those routines are pretty much entirely stand-alone. If there isn't a general-purpose B_CALL axiom, I could probably throw together an axiom for these pretty quickly.

478
Axe / Re: Quick question about archived programs' VAT entries
« on: April 08, 2011, 02:37:24 pm »
If you need to read data from the archive and don't care about speed, the OS provides several helpful routines for reading data from the archive: FlashToRam, copies an arbitrary block of data from the archive to RAM; PagedGet, used with SetupPagedPtr, lets you read and process data a byte at a time; LoadCIndPaged, reads a byte from any ROM page; and LoadDEIndPaged, reads a word from any ROM page. All of these automatically deal with wrapping, too.

479
TI Z80 / Re: zStart - an app that runs on ram clears
« on: April 07, 2011, 11:30:34 pm »
You know, when I was using Omnicalc's fonts, sometimes the font would get corrupted or disabled randomly.

EDIT: So Omnicalc's bug is unrelated. Oh, well. That's the sort of bug that makes you feel really stupid. I certainly know the feeling.

480
ASM / Re: Help with signing a flash app
« on: April 07, 2011, 11:27:09 pm »
I was wondering about that. I'm guessing that the 0109 key is like the 010A key in terms of usefulness and popularity. Speaking of which, why isn't USB8X signed with it?

Pages: 1 ... 30 31 [32] 33 34 ... 38