Source code formatting / alignment #24
Replies: 1 comment
-
After a few pages (and I've now done 324 of 340), memorizing the format was not an issue and so I no longer needed split bottom :) After formatting of a page has been corrected, I use git diff to just check for any stray characters at the end of lines (they show as red marks rather than just dots in VSCode). Then for checking/correcting against the scan I have been placing the scan above the editor and working down what is shown of each numeric/hex column and moving across those columns rather than full line by line. Once I get to the label / intruction I then work across. Finally, when a page is complete I copy it to the listing file and src file and strip columns 1-27 from the src. |
Beta Was this translation helpful? Give feedback.
-
I've checked in the first page for ECBRAM.SA at https://github.com/davidlinsley/DragonBasic/blob/main/ocr/ECBRAM.SA/CCI10222022_0001.txt
After fixing up the first page, my workflow for the next few pages has been quite fast. I'm using VSCode as my editor, and I leave that first page open and then go to View->Editor Layout -> Split Bottom to have two views one above the other. I then open the page I want to work on in the bottom. It is then really easy to align by eye, or if needed move the mouse up to check column position (though I have them memorized now).
The format of the assembler line printer output is described in the assembler manual in Appendix E "Assembler Output Format" E-3 "M6809 Format". The assembler will automatically print user-supplied sequence numbers in the left margin if they appear in the source file. Based on this, the original source did not contain sequence (line) numbers and so it is automatically generating line numbers. When we take the individually corrected OCR pages under the ocr directory to merged source, we can snip the line numbers. For the OCR fix up I am leaving them in so that we preserve as printed by Duncan.
The only deviation from this I've noted so far is that Microsoft formats single line comments with the * (comment start) at column 28 (same as label start) with comment text beginning at column 34.
Beta Was this translation helpful? Give feedback.
All reactions