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 ... 20 21 [22] 23 24 ... 38
316
Axe / Re: Axe Q&A
« on: December 05, 2011, 07:29:52 am »
You can't have more than 24 K of free RAM. You seem to be thinking of free archive, not free RAM. Yes, it returns in Ans. It's just a standard bcall.

317
Other Calculators / Re: Prizm vs 89TI
« on: November 28, 2011, 03:26:40 am »
The TI-89T is a more eco-friendly device precisely because it doesn't have a color screen. It will get much better battery life than anything with a color screen can get. The only graphing calculator that can beat the TI-89T in the battery life category is the TI-84+/SE (which gets about double the battery life).

318
TI Z80 / Re: zStart - an app that runs on ram clears
« on: November 21, 2011, 04:26:31 am »
Double post for an update: the following assembly program will execute the application named in Ans. This program never returns. Note that applications whose name is less than 8 characters are normally padded with spaces at the end.

This should go without saying, but don't run this from within a shell. (zStart doesn't count as a shell in this case.) It completely subverts the normal way that assembly programs are supposed to quit. Any assembly program can copy itself to scratch RAM and do ld hl, 9D95h \ ld de, (asm_prgm_size) \ b_call(_DelMem) \ b_call(_JForceCmdNoChar). This is what the below program does, except that instead of executing the internal homescreen app, it runs the app you've chosen. This is a horrible way to quit if you're running from within a shell.

Edit: Possible bug fixed due to incorrectly correct .org.

Source:
Code: [Select]
; ExecApp
; This assembly program transfers control to the application named in Ans.  This
; program never returns, unless the application does not exist, or you fail to
; specify a valid name.
; This can probably be improved quite a bit.  Do feel free to steal this source
; and use it in your own, more complete multi-program runner.

.nolist
#include "ti83plus.inc"
;_ExecuteApp .equ 4C51h
.list

curStrPos .equ appBackUpScreen
curBufPos .equ curStrPos+2
strBuffer .equ curBufPos+2

.org 8000h
.db t2ByteTok, tAsmCmp

; For debugging in an emulator . . . can't do any harm.
set LwrCaseActive, (iy+AppLwrCaseFlag)

; Copy self to a temporary area
ld hl, 9D95h
ld de, 8002h
ld bc, 256
ldir
jp actuallyDoChecking
actuallyDoChecking:
; Check the type of Ans
b_call(_RclAns)
ld a, (hl)
cp StrngObj
ret nz
; Convert Ans into a real string.
ex de, hl
ld a, (hl)
inc hl
ld (iy+asm_flag1), a ; Keeps track of how many bytes are left
ld a, (hl)
inc hl
ld (curStrPos), hl
or a
ret nz ; Oops, this string is obviously way too big.
ld hl, strBuffer
ld (hl), AppObj
inc hl
ld (curBufPos), hl
tokenStringToRealStringLoop:
ld hl, (curStrPos)
b_call(_Get_Tok_Strng)
ld de, (curBufPos)
ld hl, OP3 ; The documentation lies.
ldir
ld (curBufPos), de
ld hl, (curStrPos)
ld a, (hl)
inc hl
b_call(_IsA2ByteTok)
jr nz, +_
inc hl
dec (iy+asm_flag1)
_: ld (curStrPos), hl
dec (iy+asm_flag1)
jr nz, tokenStringToRealStringLoop
ld (hl), 0
; Done!  Make sure app exists.
ld hl, strBuffer
rst 20h;rMOV9TOOP1
b_call(_FindApp)
ret c
; Deallocate self
ld hl, 9D95h
ld de, (asm_prgm_size)
b_call(_DelMem)
; Aaaand, run the application.
ld hl, strBuffer+1
ld de, progToEdit
ld bc, 8
ldir
b_call(_ExecuteApp)
.end
.end

319
TI Z80 / Re: zStart - an app that runs on ram clears
« on: November 20, 2011, 07:14:15 pm »
And it could launch apps too ? O.o That would be awesome :D
Hmm, that seems useful and doable O.O Would it just require finding the app page and jumping to 4080h?
No. You have to parse the app's header to figure out where its executable code begins; the OS starts an app right after the last byte in the header. There is no need to pad the header to 80h bytes. Fortunately, the OS provides a BCALL that does all of this for you, ExecuteApp. This will probably leak RAM if called from within a RAM program unless you deallocate yourself first.

Incidentally, you can also put whatever you want in the datestamp signature field. Nothing ever checks that signature.

320
Miscellaneous / Re: hatsune miku - your thoughts?
« on: November 18, 2011, 09:27:45 pm »
That robot looks very expensive. It must easily draw 1000 watts of power.

(For comparison, on average, a human needs 125 watts of power. A large man doing extremely hard exercise needs a maximum of 1000 watts.)

321
Miscellaneous / Re: When did you start programming?
« on: November 12, 2011, 08:20:19 pm »
I started programming when I was c.a. 12 and have been doing so for about eight years.

322
No. It just sounds like a random crash.

323
Other Calc-Related Projects and Ideas / Re: BACKUP YOUR PROGRESS OFTEN!
« on: November 12, 2011, 01:32:50 pm »
My netbook decided to fail, and while the HDD is still intact, I can not read the content because its a 1.8 inch drive.
They have USB readers for those drives for less than USD$50. Amazon seems to have some for less than $10.

324
Other Calc-Related Projects and Ideas / Re: BACKUP YOUR PROGRESS OFTEN!
« on: November 12, 2011, 02:15:20 am »
Yeah, I guess it's time I submit the new undeleter on ticalc.org.

325
TI Z80 / Re: LightsOff
« on: November 06, 2011, 12:29:37 am »
The Mystery of Time and Space has, on level 12, the worst Lights-out puzzle ever. Good luck finding a perfect solution! (The game only requires you do better than 4.)

326
TI Z80 / Re: TI84+ Generating Video!!
« on: October 27, 2011, 12:26:12 pm »
Ben Ryves already did a proof-of-concept to that effect. Have fun---projects like this can really teach you a lot.

327
ASM / Re: Interrupt Questions
« on: October 13, 2011, 02:04:52 pm »
You can check whether interrupts are enabled, but there's a bug in the Z80:
# If a LD A,I or LD A,R (which copy IFF2 to the P/V flag) is interrupted, then the P/V flag is reset, even if interrupts were enabled beforehand.

328
ASM / Re: Interrupt Questions
« on: October 13, 2011, 03:35:35 am »
After the call to ParserNext, IprogPtr is never updated. I'm not sure if ParserNext is supposed to advance any pointers, but it certainly won't here. Also, for those of us who don't have the Z80 opcode table memorized, you should add a comment for .db 21h that says ; ld hl, imm16

The only other thing that comes to mind is that you need to make ensure that ParseNext completes quickly or else the main code won't run. Also, make sure that the routine never EIs. Check to make sure the interrupt vector table is correct. And don't even think of running that from flash.

329
Axe / Re: Modifying real numbers from ram ---AXE PARSER
« on: October 09, 2011, 02:34:17 am »
Axe doesn't (to my knowledge) have a proper library for using the EOS's massive floating-point library; there are literally hundreds of routines. (It is called a "calculator.") There are even routines for applying an operation to every element in a list or matrix. Plus, there are lots of other (albeit slow) system routines that would be useful for what you want to do.

330
The Axe Parser Project / Re: Axe Parser
« on: September 25, 2011, 08:44:08 pm »
Xeda seems to love doing math-y things. You should ask her to learn RSA and write an optimized app signer. How long would on-calc app signing take? It could take over ten minutes if you write a really slow signing algorithm, but my gut feeling is that it can probably be done in under a minute.

Pages: 1 ... 20 21 [22] 23 24 ... 38