83Plus:BCALLs:515E

From WikiTI
Revision as of 05:55, 18 September 2013 by KermMartian (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Synopsis

Unofficial Name: GetTimeString (TI-84+CSE: FormTime)

BCALL Address: 515E

(TI-84+/SE only) Get the current time as a string, formatted according to the user's 12/24-hour settings.

Inputs

  • de = address of buffer in which to store result. Do not use OP1-OP3, which will be overwritten. The OS uses OP6 for the buffer.

Outputs

  • Time string like "1:41AM" or "15:56" stored to buffer.

Destroys

  • All except de

Comments

Several flags control the output of this BCALL. In particular, 2,(iy+3Fh) switches 24-hour mode on, and setting 4,(iy+3Fh) means you get an ASCII string instead of a tokenized string.

Example

	ld de,Op6
	push de
		ld a,(iy+3Fh)
		push af
			set 4,(iy+3Fh)
			bcall(_GetTimeString)
			pop af
		ld (iy+3Fh),a
		pop hl
	bcall(_vputs)