Skip to content

feat(print-to-DSKY): print digit to any position#2

Draft
lucarosenberg wants to merge 2 commits intomainfrom
feature/print-to-DSKY
Draft

feat(print-to-DSKY): print digit to any position#2
lucarosenberg wants to merge 2 commits intomainfrom
feature/print-to-DSKY

Conversation

@lucarosenberg
Copy link
Collaborator

Final implementation of the print function for DSKY, allowing digits (0-9 and blank) to be printed to any user-specified position, while preserving the other digit in the position pair.

Function requires debugging before integration.

This is the first increment of the function that allows printing
a digit (0-9 and blank) to a specified position on the DSKY:
The user-specified digit is printed to the right position of
the position pair the user-specified position belongs to.
This is the final increment of the print function: It prints a digit
(0-9 and blank) to any user-specified position of the DSKY, while
retaining the digit in the other position of the position pair.
The function still needs to be debugged.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a DSKY “print digit” routine intended to write a user-selected digit (0–9 or blank) into an arbitrary 3×5 display position while preserving the other digit in the same DSKY pair by tracking per-pair display state in erasable memory.

Changes:

  • Adds helper subroutines to compute position index, pair index, pair prefix, and to extract left/right digit state from an in-memory display-state buffer.
  • Constructs and conditionally writes a full DSKY digit-pair word (prefix + left/right digit bits) to IO channel 010.
  • Adds constant tables for digit encodings and pair prefixes, plus new erasable locations for arguments/scratch/state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +219 to +225
CA DIGPAIR #----added this line to debug
EXTEND
INDEX PAIRIDX # indexing does not reset the extracode flag (EXTEND should apply to SU)
SU DISPSTAT
EXTEND
BZF LABEL1
#CA DIGPAIR # moved two lines down
CONSTROW DEC 1
CONSTCOL DEC 4

# Load arguments (digit, row and colum to print to)
Comment on lines +109 to +126
START CA CONSTDIG
TS DIGIT
CA CONSTROW
TS ROW
CA CONSTCOL
TS COLUMN
TCR PRINTDIG
TCF START


GPOSIDX CA ROW
EXTEND
MP FIVE
CA L
AD COLUMN
INCR A
TS POSIDX
RETURN
Comment on lines +109 to +116
START CA CONSTDIG
TS DIGIT
CA CONSTROW
TS ROW
CA CONSTCOL
TS COLUMN
TCR PRINTDIG
TCF START
Comment on lines +292 to +299
DISPSTAT = 0103
PRFX1 = 0104
PRFX2 = 0105
PRFX3 = 0106
PRFX4 = 0107
PRFX5 = 0110
PRFX6 = 0111
PRFX7 = 0112
Comment on lines +232 to +234
CA PRNTDIGR # restore return address
TS Q
LABEL1 RETURN
EXTEND
BZF LABEL1
#CA DIGPAIR # moved two lines down
TCR GPAIRIDX # we already call it in this function; do we have to do it again here???
@NeilFraser
Copy link
Owner

Probably a waste of $10, but should be fun for the project report. What do you think of the suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants