sysv540.inc
Original bytes preserved. This is a browser-readable view.
; sysv540.inc - CS617 independent portable cursor API candidate v0.1 ; Alex Barragan & ChatGPT (Sol), 2026-10-15 ; Read-only API contract; the implementation is included at 7000h. ; PB-2000C / AI-1000, ROM0 R0197 LCD text output. ; ; CAL SYS540_INIT : one-time per app entry; cursor initially inactive. ; CAL SYS540_PLACE : $6=absolute display cell 00..7F; $16=underlying ; ASCII 20..7E (or 00h for blank). Atomic hide, ; reposition and show of temporary '_' (5Fh). ; CAL SYS540_POLL : nonblocking; $18=1 when blink transition due, ; $18=0 otherwise; never writes screen. ; CAL SYS540_TOGGLE : render transition AFTER POLL has returned. ; CAL SYS540_HIDE : restore underlying character (safe if already off). ; CAL SYS540_SHOW : show underline if active. ; CAL SYS540_STOP : hide and mark inactive; before exiting application. ; ; These are the ONLY supported sysv540 entry points. No external code ; may read/write its private RAM1 2F20..2F2B or call private SYS5_*. ; All calls return UA14h, including POLL. Caller must restore UA54h if ; it needs the monitor RAM1 bank. All except POLL preserve $0..$29 and ; IX; POLL preserves $0..$17,$19,$29,IX, and returns event in $18. ; Condition flags not preserved. SSP must be valid. ; The first TM edge synchronizes/discards the partial second; the first ; toggle occurs after the next complete interval, then half-second ; midpoint events use the measured polling cadence. No blocking waits. ; When an editor changes the character beneath cursor, HIDE first, then ; commit the edit, then PLACE with the new underlying character. ; This is a SOURCE-ONLY test contract until built and tested on both.