feat(print-to-DSKY): print digit to any position#2
Draft
lucarosenberg wants to merge 2 commits intomainfrom
Draft
feat(print-to-DSKY): print digit to any position#2lucarosenberg wants to merge 2 commits intomainfrom
lucarosenberg wants to merge 2 commits intomainfrom
Conversation
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.
There was a problem hiding this comment.
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??? |
Owner
|
Probably a waste of $10, but should be fun for the project report. What do you think of the suggestions? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.