How to resolve the algorithm Video display modes step by step in the Applesoft BASIC programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Video display modes step by step in the Applesoft BASIC programming language

Table of Contents

Problem Statement

The task is to demonstrate how to switch video display modes within the language. A brief description of the supported video modes would be useful.

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Video display modes step by step in the Applesoft BASIC programming language

Source code in the applesoft programming language

10 GR
20 FOR I = 0 TO 15 : COLOR = I : PLOT I,I : NEXT
30 HGR
40 FOR I = 1 TO 6 : HCOLOR = I : HPLOT I * 2, I TO I * 2 + 1, I : NEXT
50 TEXT
60 HOME : FOR I = 0 TO 7 : VTAB I + 1 : FOR J = 0 TO 31 : POKE PEEK(40) + PEEK(41) * 256 + 4 + J, I * 32 + J : NEXT J, I
70 HGR2
80 FOR I = 1 TO 6 : HCOLOR = I : HPLOT I * 2, I + 6 TO I * 2 + 1, I + 6 : NEXT
90 TEXT
100 GET A$
110 IF A$ = "H" THEN POKE -16297,0 : REM HI-RESOLUTION
120 IF A$ = "L" THEN POKE -16298,0 : REM LO-RESOLUTION
130 IF A$ = "2" THEN POKE -16299,0 : REM PAGE 2
140 IF A$ = "1" THEN POKE -16300,0 : REM PAGE 1
150 IF A$ = "M" THEN POKE -16301,0 : REM MIXED TEXT
160 IF A$ = "F" THEN POKE -16302,0 : REM FULL SCREEN
170 IF A$ = "T" THEN POKE -16303,0 : REM TEXT
180 IF A$ = "G" THEN POKE -16304,0 : REM GRAPHICS
190 IF A$ <> "Q" THEN 100
200 TEXT

  

You may also check:How to resolve the algorithm Arithmetic/Integer step by step in the UNIX Shell programming language
You may also check:How to resolve the algorithm Inheritance/Single step by step in the Common Lisp programming language
You may also check:How to resolve the algorithm Find palindromic numbers in both binary and ternary bases step by step in the Arturo programming language
You may also check:How to resolve the algorithm UTF-8 encode and decode step by step in the PureBasic programming language
You may also check:How to resolve the algorithm URL decoding step by step in the OCaml programming language