As I mentioned in my last article I am currently trying to teach myself programming on the Atari 8 Bit. Right now that involves looking at the Graphics capability and working my way through the book Compute!’s First Book On Atari Graphics.
Right now I am working on Display Lists. One of the tools I am using to understand the example programs is to examine the actual display list after it has been altered. But, when working with a display list the screen is often not a convenient place to view this information (as it is often not in a place where text can be easily printed to it).
I use an emulator for most of this – though I am testing things on an actual Atari machine too. But the nice thing about the emulator is that is has a virtual printer. Anything that is printed to the printer is actually displayed on the host computer as a simple text file. That gave me the idea to write the function here.
I wanted to document it here for myself and, if anyone stumbles across here and finds it useful (in and of itself or to modify to their own taste) so much the better.
1000 REM ** PRINT DISPLAY LIST 1010 DIM DLS$(255) 1020 DL=PEEK(560)+PEEK(561)*256 1030 DLP=DL 1040 DLPV=PEEK(DLP):IF DLPV<>65 THEN DLP=DLP+1:DLS$(LEN(DLS$)+1)=STR$(DLPV):DLS$(LEN(DLS$)+1)=",":GOTO 1040 1050 DLPV=PEEK(DLP):DLS$(LEN(DLS$)+1)=STR$(DLPV):DLS$(LEN(DLS$)+1)="," 1060 DLPV=PEEK(DLP+1):DLS$(LEN(DLS$)+1)=STR$(DLPV):DLS$(LEN(DLS$)+1)="," 1070 DLPV=PEEK(DLP+2):DLS$(LEN(DLS$)+1)=STR$(DLPV) 1080 LPRINT DLS$;CHR$(12) 1090 RETURN