- ProgramViewer CE
- 27 Feb 2016 01:14:12 pm
- Last edited by PT_ on 27 Feb 2016 01:38:23 pm; edited 1 time in total
Today I've been busy with my new program, an *advanced* program viewer for the CE in pure ASM. It takes the program name as a string in Ans, and it displays the whole program, but instead of the usual 9 lines, you can see about 28 lines of code, and I'm going to add indentation as well. This is a hard project, because I'm not really experienced with ASM, but no one cares
I've used Mateo's _PrintString routine for displaying the whole program, which has a nice font, and is pretty small.
How the basic program works:
Code:
I'm now at the stage for displaying the characters. This is what I got so far:
(That last characters looks awesome but is not intended )
In a later version, I will maybe add editing as well, now I'm okay with this
I know, this could be MUCH easier with the C libraries, but with C it is very hard to convert the number to a string, so I made this in pure ASM.
If you have any suggestions or questions, please post
For the curious people: here is my program yet:
http://pastebin.com/HS9S2TWR
I've used Mateo's _PrintString routine for displaying the whole program, which has a nice font, and is pretty small.
How the basic program works:
Code:
Read Ans as a string
Convert it to a program name in OP1
Check if program exists, and if not, return
Setup the graphics
For each token of the data of the program:
Get the token in ASCII characters with _Get_Tok_Strng
Display all the characters, if not offscreen
If (newline) is entered, move the cursor to the newline
If end of program reached, stop
End
Possibility to move up or down and eventually left or right
Pause
Return
I'm now at the stage for displaying the characters. This is what I got so far:
(That last characters looks awesome but is not intended )
In a later version, I will maybe add editing as well, now I'm okay with this
I know, this could be MUCH easier with the C libraries, but with C it is very hard to convert the number to a string, so I made this in pure ASM.
If you have any suggestions or questions, please post
For the curious people: here is my program yet:
http://pastebin.com/HS9S2TWR