Improved QBasic tutorials in group 2
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 21 Jul 2024 10:56:44 +0000 (13:56 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Sun, 21 Jul 2024 10:56:44 +0000 (13:56 +0300)
95 files changed:
QBasic tutorial/Group 1/00.bas [new file with mode: 0755]
QBasic tutorial/Group 1/01.bas [new file with mode: 0755]
QBasic tutorial/Group 1/02.bas [new file with mode: 0755]
QBasic tutorial/Group 1/03.bas [new file with mode: 0755]
QBasic tutorial/Group 1/04.bas [new file with mode: 0755]
QBasic tutorial/Group 1/05.bas [new file with mode: 0755]
QBasic tutorial/Group 1/06.bas [new file with mode: 0755]
QBasic tutorial/Group 1/07.bas [new file with mode: 0755]
QBasic tutorial/Group 1/08.bas [new file with mode: 0755]
QBasic tutorial/Group 1/09.bas [new file with mode: 0755]
QBasic tutorial/Group 1/10.bas [new file with mode: 0755]
QBasic tutorial/Group 1/11.bas [new file with mode: 0755]
QBasic tutorial/Group 1/12.bas [new file with mode: 0755]
QBasic tutorial/Group 1/13.bas [new file with mode: 0755]
QBasic tutorial/Group 1/15.bas [new file with mode: 0755]
QBasic tutorial/Group 1/16.bas [new file with mode: 0755]
QBasic tutorial/Group 1/17.bas [new file with mode: 0755]
QBasic tutorial/Group 1/18.bas [new file with mode: 0755]
QBasic tutorial/Group 1/19.bas [new file with mode: 0755]
QBasic tutorial/Group 2/01.bas [new file with mode: 0755]
QBasic tutorial/Group 2/03.bas [new file with mode: 0755]
QBasic tutorial/Group 2/05.bas [new file with mode: 0755]
QBasic tutorial/Group 2/07.bas [new file with mode: 0755]
QBasic tutorial/Group 2/08.bas [new file with mode: 0755]
QBasic tutorial/Group 2/09.bas [new file with mode: 0755]
QBasic tutorial/Group 2/10.bas [new file with mode: 0755]
QBasic tutorial/Group 2/12.bas [new file with mode: 0755]
QBasic tutorial/Group 2/13.bas [new file with mode: 0755]
QBasic tutorial/Group 2/14.bas [new file with mode: 0755]
QBasic tutorial/Group 2/15.bas [new file with mode: 0755]
QBasic tutorial/Group 2/16.bas [new file with mode: 0755]
QBasic tutorial/Group 2/17.bas [new file with mode: 0755]
QBasic tutorial/Group 2/18.bas [new file with mode: 0755]
QBasic tutorial/Group 3/00.bas [new file with mode: 0755]
QBasic tutorial/Group 3/01.bas [new file with mode: 0755]
QBasic tutorial/Group 3/02.bas [new file with mode: 0755]
QBasic tutorial/Group 3/03.bas [new file with mode: 0755]
QBasic tutorial/Group 3/04.bas [new file with mode: 0755]
QBasic tutorial/Group 3/05.bas [new file with mode: 0755]
QBasic tutorial/Group 3/06.bas [new file with mode: 0755]
QBasic tutorial/Group 3/07.bas [new file with mode: 0755]
QBasic tutorial/Group 3/08.bas [new file with mode: 0755]
QBasic tutorial/Group 3/09.bas [new file with mode: 0755]
QBasic tutorial/Group 3/10.bas [new file with mode: 0755]
QBasic tutorial/Group 3/11.bas [new file with mode: 0755]
QBasic tutorial/group1/00.bas [deleted file]
QBasic tutorial/group1/01.bas [deleted file]
QBasic tutorial/group1/02.bas [deleted file]
QBasic tutorial/group1/03.bas [deleted file]
QBasic tutorial/group1/04.bas [deleted file]
QBasic tutorial/group1/05.bas [deleted file]
QBasic tutorial/group1/06.bas [deleted file]
QBasic tutorial/group1/07.bas [deleted file]
QBasic tutorial/group1/08.bas [deleted file]
QBasic tutorial/group1/09.bas [deleted file]
QBasic tutorial/group1/10.bas [deleted file]
QBasic tutorial/group1/11.bas [deleted file]
QBasic tutorial/group1/12.bas [deleted file]
QBasic tutorial/group1/13.bas [deleted file]
QBasic tutorial/group1/15.bas [deleted file]
QBasic tutorial/group1/16.bas [deleted file]
QBasic tutorial/group1/17.bas [deleted file]
QBasic tutorial/group1/18.bas [deleted file]
QBasic tutorial/group1/19.bas [deleted file]
QBasic tutorial/group2/01.bas [deleted file]
QBasic tutorial/group2/02.bas [deleted file]
QBasic tutorial/group2/03.bas [deleted file]
QBasic tutorial/group2/04.bas [deleted file]
QBasic tutorial/group2/05.bas [deleted file]
QBasic tutorial/group2/06.bas [deleted file]
QBasic tutorial/group2/07.bas [deleted file]
QBasic tutorial/group2/08.bas [deleted file]
QBasic tutorial/group2/09.bas [deleted file]
QBasic tutorial/group2/10.bas [deleted file]
QBasic tutorial/group2/11.bas [deleted file]
QBasic tutorial/group2/12.bas [deleted file]
QBasic tutorial/group2/13.bas [deleted file]
QBasic tutorial/group2/14.bas [deleted file]
QBasic tutorial/group2/15.bas [deleted file]
QBasic tutorial/group2/16.bas [deleted file]
QBasic tutorial/group2/17.bas [deleted file]
QBasic tutorial/group2/18.bas [deleted file]
QBasic tutorial/group3/00.bas [deleted file]
QBasic tutorial/group3/01.bas [deleted file]
QBasic tutorial/group3/02.bas [deleted file]
QBasic tutorial/group3/03.bas [deleted file]
QBasic tutorial/group3/04.bas [deleted file]
QBasic tutorial/group3/05.bas [deleted file]
QBasic tutorial/group3/06.bas [deleted file]
QBasic tutorial/group3/07.bas [deleted file]
QBasic tutorial/group3/08.bas [deleted file]
QBasic tutorial/group3/09.bas [deleted file]
QBasic tutorial/group3/10.bas [deleted file]
QBasic tutorial/group3/11.bas [deleted file]
index.org

diff --git a/QBasic tutorial/Group 1/00.bas b/QBasic tutorial/Group 1/00.bas
new file mode 100755 (executable)
index 0000000..fc62f12
--- /dev/null
@@ -0,0 +1,10 @@
+' This program demonstrates a basic "Hello World" example in QuickBasic.
+' It is designed to be simple and easy to understand for novice programmers.
+
+' The following line prints a greeting message to the console.
+PRINT "Hello world!"
+
+' When you run this program, it will output the string "Hello world!" to the screen.
+' This is a traditional first step in learning any new programming language.
+
+' To execute this program, press F5 while in the QuickBasic editor environment.
diff --git a/QBasic tutorial/Group 1/01.bas b/QBasic tutorial/Group 1/01.bas
new file mode 100755 (executable)
index 0000000..0760259
--- /dev/null
@@ -0,0 +1,24 @@
+' This QuickBasic program demonstrates basic arithmetic operations
+' and the use of variables. It will perform a series of calculations
+' on a single variable and print the results after each operation.
+
+CLS ' Clears the screen to provide a clean output area
+
+' Initialize a variable with the value 3
+DIM initialValue AS INTEGER
+initialValue = 3
+
+' Print the current value of initialValue
+PRINT "The initial value is: "; initialValue
+
+' Perform multiplication and assign the result back to initialValue
+initialValue = initialValue * 2
+
+' Print the new value after multiplication
+PRINT "After doubling, the value is: "; initialValue
+
+' Perform subtraction and decrease initialValue by 1
+initialValue = initialValue - 1
+
+' Print the final value after subtraction
+PRINT "After decrementing by 1, the value is: "; initialValue
diff --git a/QBasic tutorial/Group 1/02.bas b/QBasic tutorial/Group 1/02.bas
new file mode 100755 (executable)
index 0000000..ccf5019
--- /dev/null
@@ -0,0 +1,21 @@
+' This program demonstrates basic arithmetic operations in QuickBasic
+
+CLS ' Clears the screen to provide a clean output area
+
+' Declare a variable 'a' and assign it the value of 7
+DIM a AS INTEGER
+a = 7
+
+' Print the current value of 'a' to the console
+PRINT "The value contained in variable 'a' is: "; a
+
+' Perform a series of arithmetic operations on the value of 'a'
+' and print the result
+PRINT "Performing some calculations with 'a':";
+PRINT (a + 2.1234) / 3 * 4 - 6
+
+' Explanation of the calculation:
+' 1. Add 2.1234 to 'a'
+' 2. Divide the result by 3
+' 3. Multiply the new result by 4
+' 4. Subtract 6 from the final result
diff --git a/QBasic tutorial/Group 1/03.bas b/QBasic tutorial/Group 1/03.bas
new file mode 100755 (executable)
index 0000000..6f6cebe
--- /dev/null
@@ -0,0 +1,34 @@
+' This program demonstrates how to use semicolon and comma as separators\r
+' in PRINT statements within Microsoft QuickBasic.\r
+\r
+CLS ' Clears the screen before starting the program\r
+\r
+' Semicolon Separator Example\r
+\r
+' The semicolon is used to print multiple items on the same line, without\r
+' advancing to a new line after each item. It is useful for formatting output\r
+' in a single line of text.\r
+\r
+PRINT "Semicolon separator:"\r
+PRINT 12; 314; 122; 1; 43      ' Prints numbers separated by semicolons on the same line\r
+PRINT 312; 4; 1; 3111; 3       ' Continues printing more numbers on the next line\r
+PRINT 3; 2344; 12231; 1; 12333 ' Final set of numbers printed on the last line\r
+\r
+' Print an empty line for better readability\r
+PRINT ' This statement prints an empty line to separate different sections\r
+\r
+' Comma Separator Example\r
+\r
+' The comma is used as a separator in PRINT statements to print multiple items,\r
+' each followed by a space and advancing to the next tab column (default is 14\r
+' characters apart). If there are more items than columns, it will start\r
+' a new line.\r
+\r
+PRINT "Comma separator:"\r
+PRINT 12, 314, 122, 1, 43      ' Prints numbers separated by commas, with spacing\r
+PRINT 312, 4, 1, 3111, 3       ' Numbers are printed in tabular form\r
+PRINT 3, 2344, 12231, 1, 12333 ' Continues the tabular output\r
+\r
+' End of program\r
+END ' This statement marks the end of the QuickBasic program\r
+\r
diff --git a/QBasic tutorial/Group 1/04.bas b/QBasic tutorial/Group 1/04.bas
new file mode 100755 (executable)
index 0000000..dd1a43d
--- /dev/null
@@ -0,0 +1,17 @@
+' This program prompts the user to enter a number and then prints that number back to the screen.
+' It demonstrates basic input/output operations in QuickBasic.
+
+DEFINT A-Z ' Declare all variables as integers for simplicity
+
+' Declare a variable to store the user's input
+DIM num AS INTEGER
+
+' Use the INPUT statement to prompt the user and read their input
+PRINT "Please enter a number:";
+INPUT num
+
+' Print a message to the screen along with the entered number
+PRINT "You entered: "; num
+
+' End of program
+END
diff --git a/QBasic tutorial/Group 1/05.bas b/QBasic tutorial/Group 1/05.bas
new file mode 100755 (executable)
index 0000000..5d56b0c
--- /dev/null
@@ -0,0 +1,26 @@
+REM **** Guess a Number Game ****
+
+DEFINT A-Z ' Define all variables as integers for performance and clarity
+
+' Main game loop
+DO
+    ' Prompt the user to enter a number
+    INPUT "Enter a number between 1 and 10: "; guess
+
+    ' Check if the user guessed the correct number
+    IF guess = 5 THEN
+        ' If the guess is correct, congratulate the user and exit the loop
+        PRINT "Correct!!! You've guessed the secret number."
+        EXIT DO
+    ELSEIF guess < 5 THEN
+        ' If the guess is too low, prompt the user to try a higher number
+        PRINT "Try a bigger number."
+    ELSEIF guess > 5 THEN
+        ' If the guess is too high, prompt the user to try a lower number
+        PRINT "Try a smaller number."
+    END IF
+LOOP
+
+' End of the program
+PRINT "Thank you for playing! Goodbye."
+END
diff --git a/QBasic tutorial/Group 1/06.bas b/QBasic tutorial/Group 1/06.bas
new file mode 100755 (executable)
index 0000000..4237cf8
--- /dev/null
@@ -0,0 +1,22 @@
+CLS ' Clear the screen
+
+' This program demonstrates a simple counting loop in QuickBasic.
+' It will print the current value of 'a' and increment it by 1 each time.
+' The loop continues until 'a' is no longer less than 10.
+
+DIM a AS INTEGER ' Declare variable 'a' as an integer
+
+' Initialize the counter variable 'a' to start at 1
+a = 1
+
+' Start of the counting loop
+DO WHILE a < 10
+    ' Print the current value of 'a' with a label
+    PRINT "current:"; a
+
+    ' Increment 'a' by 1
+    a = a + 1
+LOOP
+
+' The program will end after the loop finishes
+END
diff --git a/QBasic tutorial/Group 1/07.bas b/QBasic tutorial/Group 1/07.bas
new file mode 100755 (executable)
index 0000000..9bb214b
--- /dev/null
@@ -0,0 +1,12 @@
+' This program demonstrates a simple FOR loop in Microsoft QuickBasic
+
+CLS ' Clears the screen, preparing it for output
+
+' We are about to use a FOR loop to print numbers from 1 to 10
+FOR i = 1 TO 10 ' Initialize a counter variable 'i' starting at 1
+    ' For each iteration of the loop, print the current value of 'i'
+    PRINT "current: "; i ' Outputs the message with the current number
+NEXT i ' Increment 'i' by 1 and repeat the loop until 'i' is no longer less than or equal to 10
+
+' The program has now finished executing and will end
+END ' This marks the end of the QuickBasic program
diff --git a/QBasic tutorial/Group 1/08.bas b/QBasic tutorial/Group 1/08.bas
new file mode 100755 (executable)
index 0000000..8df64b6
--- /dev/null
@@ -0,0 +1,23 @@
+' This program demonstrates how to use a FOR loop and the SOUND statement
+' in QuickBasic. It plays a series of tones at increasing frequencies
+' from 100 Hz to 1000 Hz, in steps of 50 Hz, with each tone lasting for
+' one duration unit as defined by the SOUND statement.
+
+CLS ' Clears the screen before starting the program
+
+' Initialize the frequency variable to the starting value
+LET frequency = 100
+
+' Loop from the initial frequency (100 Hz) to the maximum frequency (1000 Hz),
+' increasing by 50 Hz on each iteration
+FOR frequency = 100 TO 1000 STEP 50
+    ' Print the current frequency value to the console
+    PRINT "Current Frequency:"; frequency; " Hz"
+
+    ' Play a sound at the specified frequency and duration
+    ' The SOUND statement takes two arguments: frequency and duration
+    SOUND frequency, 1 ' The duration is set to 1 (shortest possible sound)
+NEXT frequency
+
+' End of program execution
+END
diff --git a/QBasic tutorial/Group 1/09.bas b/QBasic tutorial/Group 1/09.bas
new file mode 100755 (executable)
index 0000000..1b96f04
--- /dev/null
@@ -0,0 +1,22 @@
+REM This program demonstrates how to generate random numbers\r
+REM and use them to create sound effects in QuickBasic.\r
+\r
+CLS ' Clear the screen before starting the program\r
+\r
+' Define constants for the range of random numbers\r
+FOR i = 1 TO 20 ' Loop 20 times to generate and play 20 random sounds\r
+    ' Generate a random floating-point number between LOWER_BOUND and UPPER_BOUND\r
+    n = RND * 1000\r
+    ' Print the generated random number to the screen\r
+    PRINT "Random number: "; n\r
+\r
+    ' Play a sound with a frequency based on the random number\r
+    ' The QuickBasic SOUND statement takes two arguments: frequency and duration\r
+    ' We add 40 to the random number to shift the frequency range\r
+    ' so that it is more audible\r
+    SOUND n + 40, 1 ' Play the sound for a short duration (1/89th of a second)\r
+\r
+NEXT i\r
+\r
+END ' End the program\r
+\r
diff --git a/QBasic tutorial/Group 1/10.bas b/QBasic tutorial/Group 1/10.bas
new file mode 100755 (executable)
index 0000000..ab4120b
--- /dev/null
@@ -0,0 +1,25 @@
+' This example program demonstrates how to use the WIDTH and COLOR\r
+' statements in QuickBasic to change the text font size and text colors.\r
+\r
+' Set the text window to a smaller font size suitable for displaying\r
+' 50 lines of text within an 80-column width.\r
+WIDTH 80, 50\r
+\r
+' Define constants for the number of colors available in standard\r
+' QuickBasic color palette.\r
+CONST NumColors = 32\r
+\r
+' Loop through all possible colors (0 to 31) and display a message\r
+' with each color to illustrate the different text color options.\r
+FOR colorIndex = 0 TO NumColors - 1\r
+    ' Set the current text color using the COLOR statement.\r
+    ' Colors range from 0 to 15 are solid, while colors 16 to 31\r
+    ' will blink slowly or quickly depending on the terminal.\r
+    COLOR colorIndex\r
+\r
+    ' Print a message indicating which color number is currently being used.\r
+    ' Note that color numbers 16 and above will produce blinking text.\r
+    PRINT "This is text color number "; colorIndex; "."\r
+\r
+NEXT colorIndex\r
+\r
diff --git a/QBasic tutorial/Group 1/11.bas b/QBasic tutorial/Group 1/11.bas
new file mode 100755 (executable)
index 0000000..e6f69e6
--- /dev/null
@@ -0,0 +1,27 @@
+' This program demonstrates how to use the COLOR statement and LOCATE function
+' in Microsoft QuickBasic to change the text color and cursor position
+' on the console screen.
+
+CLS ' Clears the screen before starting
+
+' Set the text color to yellow (color code 14) and position the cursor
+' at row 1, column 50. Then print a message at that location.
+COLOR 14
+LOCATE 1, 50 ' Sets the cursor location to <row=1, column=50>
+PRINT "Yellow text at 1, 50"
+
+' Change the text color to pink (color code 12) and move the cursor
+' to row 6, column 5. Print a message with the new color and position.
+COLOR 12
+LOCATE 6, 5 ' Sets the cursor location to <row=6, column=5>
+PRINT "Pink text at 6, 5"
+
+' Update the text color to green (color code 10) and set the cursor
+' to row 20, column 40. Display a message at this new location.
+COLOR 10
+LOCATE 20, 40 ' Sets the cursor location to <row=20, column=40>
+PRINT "Green text at 20, 40"
+
+' The program finishes execution here. Users can add more statements
+' below this line to experiment with different colors and positions.
+END ' End of the program
diff --git a/QBasic tutorial/Group 1/12.bas b/QBasic tutorial/Group 1/12.bas
new file mode 100755 (executable)
index 0000000..3aa9c36
--- /dev/null
@@ -0,0 +1,24 @@
+' This program demonstrates the use of FOR loops, color manipulation,
+' and string output in QuickBasic. It also shows how to prevent the
+' cursor from moving to a new line after printing a string.
+
+CLS ' Clears the screen before starting the program
+
+' The first loop demonstrates changing text colors using the COLOR statement
+' inside a FOR loop, which iterates from 1 to 15 (the number of available
+' color attributes in QuickBasic).
+FOR ColorIndex = 1 TO 15
+    COLOR ColorIndex ' Set the current text color to the loop index
+    PRINT "This is a test" ' Print the string with the new color
+NEXT ColorIndex
+
+PRINT ' Print a blank line for better readability
+
+' The second loop does the same as the first one, but it uses a semicolon
+' at the end of the PRINT statement to prevent the cursor from moving
+' to the start of a new line after each string output. This results in
+' all strings being printed on the same line.
+FOR ColorIndex = 1 TO 15
+    COLOR ColorIndex ' Change the text color for each iteration
+    PRINT "This is a test"; ' Print the string and keep the cursor on the same line
+NEXT ColorIndex
diff --git a/QBasic tutorial/Group 1/13.bas b/QBasic tutorial/Group 1/13.bas
new file mode 100755 (executable)
index 0000000..c778556
--- /dev/null
@@ -0,0 +1,19 @@
+' This example QuickBasic program demonstrates the difference between
+' normal division and integer division with rounding.
+
+CLS                       ' Clears the screen to provide a clean output area
+
+' Perform normal division which results in a floating-point number
+' and print the result
+PRINT "Normal division (70 / 4):"; 70 / 4
+
+' Explain the use of backslash (\) for integer division with rounding
+' Perform integer division with rounding and print the result
+PRINT "Integer division with rounding (70 \ 4):"; 70 \ 4
+
+' Provide a brief conclusion to summarize what was demonstrated
+PRINT
+PRINT "In QuickBasic, '/' performs normal division, while '\' does integer division"
+PRINT "and rounds the result to the nearest whole number."
+
+END                       ' End of program
diff --git a/QBasic tutorial/Group 1/15.bas b/QBasic tutorial/Group 1/15.bas
new file mode 100755 (executable)
index 0000000..242c221
--- /dev/null
@@ -0,0 +1,18 @@
+' This program demonstrates the use of nested FOR loops in QuickBasic\r
+' to draw a simple pattern on the screen.\r
+\r
+CLS ' Clears the screen and prepares for output\r
+\r
+' Outer loop will run 15 times, representing rows\r
+FOR row = 1 TO 15\r
+\r
+    ' Inner loop will run 60 times, representing columns within each row\r
+    FOR column = 1 TO 60\r
+        PRINT "#"; ' Print a '#' character followed by no space to create a continuous line\r
+    NEXT column\r
+\r
+    ' After completing one row, print a newline character to move to the next line\r
+    PRINT\r
+\r
+NEXT row\r
+\r
diff --git a/QBasic tutorial/Group 1/16.bas b/QBasic tutorial/Group 1/16.bas
new file mode 100755 (executable)
index 0000000..71f1eaf
--- /dev/null
@@ -0,0 +1,34 @@
+' QuickBasic example program to demonstrate the use of nested loops
+' and how to control the flow of a loop using the STEP keyword.
+
+CLS ' Clears the screen before starting the program
+
+' This outer loop will iterate from 1 to 10
+FOR b = 1 TO 10
+    ' The inner loop will print "A" b times, where b is the current
+    ' value of the outer loop iterator
+    FOR a = 1 TO b
+        PRINT "A"; ' Print "A" followed by a semicolon to prevent newline
+    NEXT a
+
+    ' After each inner loop iteration, print a newline to start the next line
+    PRINT
+NEXT b
+
+' Print a blank line to separate the two parts of the demonstration
+PRINT
+
+' This outer loop will iterate from 60 to 0, decrementing by 8 each time
+FOR b = 60 TO 0 STEP -8
+    ' The inner loop will print "B" b times, where b is the current
+    ' value of the outer loop iterator
+    FOR a = 1 TO b
+        PRINT "B"; ' Print "B" followed by a semicolon to prevent newline
+    NEXT a
+
+    ' After each inner loop iteration, print a newline to start the next line
+    PRINT
+NEXT b
+
+' End of the program
+END
diff --git a/QBasic tutorial/Group 1/17.bas b/QBasic tutorial/Group 1/17.bas
new file mode 100755 (executable)
index 0000000..b5e5f35
--- /dev/null
@@ -0,0 +1,31 @@
+' This example QuickBasic program demonstrates how to use the built-in
+' timer, as well as how to display the current system time and date.
+' It also shows a simple loop structure and the use of the CLS statement
+' to clear the screen.
+
+' To stop the program, press CTRL + PAUSE/BREAK.
+
+DO
+    ' Clear the screen to provide a clean display for each iteration.
+    CLS
+
+    ' Retrieve and print the current value of the system timer.
+    ' The TIMER function returns the number of seconds that have
+    ' elapsed since midnight, not counting leap seconds.
+    PRINT "System Timer: "; TIMER; " seconds since midnight."
+
+    ' Retrieve and print the current system time using TIME$.
+    ' TIME$ returns a string in the format "HH:MM:SS".
+    PRINT "Current System Time: "; TIME$; "."
+
+    ' Retrieve and print the current system date using DATE$.
+    ' DATE$ returns a string in the format "M/D/YYYY" or "DD/MM/YYYY"
+    ' depending on regional settings.
+    PRINT "Current System Date: "; DATE$; "."
+
+    ' Pause for a moment to allow the user to see the output before
+    ' it is cleared again in the next iteration of the loop.
+    ' The Sleep statement requires including the QB.BI library.
+    SLEEP 1
+
+LOOP
diff --git a/QBasic tutorial/Group 1/18.bas b/QBasic tutorial/Group 1/18.bas
new file mode 100755 (executable)
index 0000000..0aec40a
--- /dev/null
@@ -0,0 +1,31 @@
+' This example program demonstrates the use of the RND function
+' to generate random numbers in Microsoft QuickBasic.
+
+' Clear the screen before starting the program
+CLS
+
+' The first loop will print ten random numbers. However, these
+' numbers may not seem truly random because the random number
+' generator needs to be seeded with a varying value.
+
+PRINT "First group of 'random' numbers without seeding:"
+FOR b = 1 TO 10
+    PRINT RND
+NEXT b
+
+' Print an empty line for better readability between the two groups
+PRINT
+
+' Seed the random number generator using the TIMER function, which
+' returns the number of seconds since midnight. This ensures that
+' subsequent calls to RND will yield different sequences of numbers
+' each time the program is run after being restarted.
+RANDOMIZE TIMER
+PRINT "Second group of truly random numbers with seeding:"
+
+' Now, print another ten random numbers after seeding the generator
+FOR b = 1 TO 10
+    PRINT RND
+NEXT b
+
+' End of program
diff --git a/QBasic tutorial/Group 1/19.bas b/QBasic tutorial/Group 1/19.bas
new file mode 100755 (executable)
index 0000000..536364b
--- /dev/null
@@ -0,0 +1,31 @@
+' This program demonstrates how to use the QuickBasic functions RND (random number generator),\r
+' COLOR (sets text and background color), LOCATE (positions the cursor on the screen), PRINT (displays text),\r
+' SOUND (generates a tone through the PC speaker)\r
+\r
+CLS ' Clears the screen before starting the program\r
+\r
+' Generate random coordinates (x, y) for text placement on the screen\r
+' and a random color (c) for the text.\r
+' The screen has 80 columns (0-79) and 25 lines (0-24), but we start counting from 1.\r
+\r
+\r
+' INKEY$ returns a string containing any keystroke; if no key is pressed, it returns an empty string\r
+DO WHILE INKEY$ = ""\r
+    x = INT(RND * 80) + 1  ' Random column, ensuring it is within the screen width\r
+    y = INT(RND * 25) + 1  ' Random line, ensuring it is within the screen height\r
+    c = INT(RND * 16)      ' Random color index (0-15), where 0 is black and 15 is white\r
+\r
+    ' Set the text color to the randomly chosen color\r
+    COLOR c\r
+\r
+    ' Position the cursor at the random coordinates\r
+    LOCATE y, x\r
+\r
+    ' Print an "x" character at the current cursor position\r
+    PRINT "x"; ' The semicolon prevents advancing to the next line\r
+\r
+    ' Generate a sound with a frequency based on the x coordinate and a duration of 0.1 seconds\r
+    SOUND x * 100 + 100, 1\r
+\r
+LOOP\r
+\r
diff --git a/QBasic tutorial/Group 2/01.bas b/QBasic tutorial/Group 2/01.bas
new file mode 100755 (executable)
index 0000000..d3f31ae
--- /dev/null
@@ -0,0 +1,38 @@
+CLS
+
+' This program demonstrates how to use the SOUND statement in QuickBasic
+' to play tones with varying frequency and duration.
+
+' Play a sequence of tones with increasing frequency
+' Each tone has a fixed duration of 2 time units
+PRINT "Playing tones with increasing frequency:"
+SOUND 1000, 2          ' Play a tone at 1000 Hz for 2 time units
+SOUND 2000, 2          ' Play a tone at 2000 Hz for 2 time units
+SOUND 3000, 2          ' Play a tone at 3000 Hz for 2 time units
+
+' Wait for 10 time units to create a pause
+PRINT "Pausing for 10 time units..."
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+' Play a sequence of tones with a fixed frequency
+' Each tone has an increasing duration
+PRINT "Playing tones with fixed frequency and increasing length:"
+SOUND 1000, 1          ' Play a tone at 1000 Hz for 1 time unit
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 2          ' Play a tone at 1000 Hz for 2 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 4          ' Play a tone at 1000 Hz for 4 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+SOUND 1000, 8          ' Play a tone at 1000 Hz for 8 time units
+SOUND 0, 10            ' Pause for 10 time units (silence)
+
+' Notes:
+' - The SOUND statement takes two arguments: frequency and duration.
+' - Frequency is specified in Hertz (Hz), and duration is specified in time units.
+' - A frequency of 0 results in silence, which can be used to create pauses.
+' - Time units are not precisely defined by QuickBasic and may vary depending
+'   on the hardware and system configuration. They provide a relative measure
+'   for timing musical tones.
diff --git a/QBasic tutorial/Group 2/03.bas b/QBasic tutorial/Group 2/03.bas
new file mode 100755 (executable)
index 0000000..c2bba1e
--- /dev/null
@@ -0,0 +1,16 @@
+' This program demonstrates basic user input and string manipulation in QuickBasic.
+' It greets the user by name and asks how they are doing, using colors to enhance the output.
+
+CLS ' Clears the screen to provide a clean start for the program.
+
+' Prompt the user for their name and store it in a variable called userName$.
+INPUT "Hi, what is your name: ", userName$
+
+' Set the text color to a bright green (color code 10) for a pleasant visual effect.
+COLOR 10
+
+' Greet the user by printing "Hello" followed by their name and an exclamation mark.
+PRINT "Hello " + userName$ + "!"
+
+' Ask the user how they are doing by appending their name to the question.
+PRINT userName$ + ", how are you?"
diff --git a/QBasic tutorial/Group 2/05.bas b/QBasic tutorial/Group 2/05.bas
new file mode 100755 (executable)
index 0000000..031f8d4
--- /dev/null
@@ -0,0 +1,52 @@
+CLS
+
+' This program creates a simple text-based box in the console window.
+' The user specifies the horizontal and vertical size of the box within
+' certain constraints to ensure it fits on the screen.
+
+' Prompt the user for the horizontal size of the box (between 2 and 79)
+INPUT "Enter the Horizontal Size of the Box (2 to 79): ", hs
+
+' Validate the horizontal size input
+WHILE hs < 2 OR hs > 79
+    PRINT "Invalid input. Please enter a number between 2 and 79."
+    INPUT "Enter the Horizontal Size of the Box (2 to 79): ", hs
+WEND
+
+' Prompt the user for the vertical size of the box (between 2 and 23)
+INPUT "Enter the Vertical Size of the Box (2 to 23): ", vs
+
+' Validate the vertical size input
+WHILE vs < 2 OR vs > 23
+    PRINT "Invalid input. Please enter a number between 2 and 23."
+    INPUT "Enter the Vertical Size of the Box (2 to 23): ", vs
+WEND
+
+' Draw the top line of the box
+FOR i = 1 TO hs
+    PRINT "#";
+NEXT i
+PRINT
+
+' Draw the middle section of the box
+FOR y = 1 TO vs - 2
+    ' Print the left side of the box
+    PRINT "#";
+
+    ' Print the interior of the box
+    FOR i = 1 TO hs - 2
+        PRINT ".";
+    NEXT i
+
+    ' Print the right side of the box
+    PRINT "#"
+NEXT y
+
+' Draw the bottom line of the box
+FOR i = 1 TO hs
+    PRINT "#";
+NEXT i
+PRINT
+
+' The program has finished drawing the box and now ends
+END
diff --git a/QBasic tutorial/Group 2/07.bas b/QBasic tutorial/Group 2/07.bas
new file mode 100755 (executable)
index 0000000..afe3d37
--- /dev/null
@@ -0,0 +1,36 @@
+REM This program demonstrates basic input/output and conditional logic in QuickBasic.
+REM It prompts the user to enter a number and then evaluates that number
+REM with respect to the value 5 using various comparison operators.
+
+PRINT "Please enter a number:"
+INPUT n
+
+REM Check if the number is less than 5
+IF n < 5 THEN
+    PRINT "The number you entered is smaller than 5."
+END IF
+
+REM Check if the number is greater than 5
+IF n > 5 THEN
+    PRINT "The number you entered is greater than 5."
+END IF
+
+REM Check if the number is exactly equal to 5
+IF n = 5 THEN
+    PRINT "The number you entered is equal to 5."
+END IF
+
+REM Check if the number is less than or equal to 5
+IF n <= 5 THEN
+    PRINT "The number you entered is 5, or less."
+END IF
+
+REM Check if the number is greater than or equal to 5
+IF n >= 5 THEN
+    PRINT "The number you entered is 5, or greater."
+END IF
+
+REM Check if the number is not equal to 5
+IF n <> 5 THEN
+    PRINT "The number you entered is not 5."
+END IF
diff --git a/QBasic tutorial/Group 2/08.bas b/QBasic tutorial/Group 2/08.bas
new file mode 100755 (executable)
index 0000000..930bea8
--- /dev/null
@@ -0,0 +1,80 @@
+CLS
+
+' This program simulates a login prompt for a nuclear rocket control system.
+' It asks the user to enter a password and checks if the entered password is correct.
+' If the password is incorrect, it prompts the user again.
+
+' Define a constant for the correct password for better security practices
+CONST CorrectPassword = "jerry"
+
+' Function to display the welcome message
+SUB DisplayWelcomeMessage
+    LOCATE 1, 1
+    COLOR 14
+    PRINT "          ========================================"
+    PRINT "          Welcome to nuclear rocket control system"
+    PRINT "          ========================================"
+END SUB
+
+' Function to display the rocket artwork
+SUB DisplayRocketArt
+    COLOR 10, 1
+    PRINT "..............................................................."
+    PRINT ".....MMMMMM................MM...MMMMMMM.MMMMMM.MMM..MMMMMMM..MM"
+    PRINT "MMMMMMMMMMMMMMM...MM.M....MMMMM.MM.MMMMMMMMMMMMMMMMMMMMMMM.MM.."
+    PRINT ".MMMMMMMMMMM.M.....MMM...MM.....MMMMMMMMMMMMMMMMMMMMMM.M......."
+    PRINT "..MMMMMMMMMMMM..............MMMMMMMMMMMMMMMMMMMMMMMMMM..M ....."
+    PRINT "....MMMMMMMM...............MMMM..MMMMM.MMMMMMMMMMMMM.MM........"
+    PRINT ".....MMMMMMM.............MMMMMMMM..MMM..MMMMMM.MMMMM.M........."
+    PRINT "........MM...............MMMMMMMMMM.M.....MM...........M......."
+    PRINT "......MMMMMM................MMMMMMM....................M......."
+    PRINT ".....MMMMMMMM.................MMMMMM....................MMM...."
+    PRINT "......MMMMMMM.................MMMMM...................MMMMMM..."
+    PRINT "........MMMMMM..................MM....................MMMMMMM.."
+    PRINT "..........MMMMM ...........................................MM.."
+END SUB
+
+' Function to play a simple tune
+SUB PlayTune
+    FOR a = 9 TO 23
+        SOUND 1.5 ^ a, 3
+    NEXT a
+END SUB
+
+' Main program execution starts here
+DO
+    ' Clear the screen and prompt the user for the password
+    CLS
+    COLOR 7
+    PRINT "Enter password: ";
+
+    ' Temporarily set text color to black to hide the password input
+    COLOR 0
+    INPUT "", UserPassword$
+
+    ' Restore original text color
+    COLOR 7
+LOOP UNTIL UserPassword$ = CorrectPassword
+
+' Clear the screen for the welcome message
+CLS
+
+' Call the function to display the welcome message
+DisplayWelcomeMessage
+
+' Call the function to display the rocket artwork
+DisplayRocketArt
+
+' Locate and display our location with a special color
+LOCATE 7, 34
+COLOR 12 + 16
+PRINT "*"
+
+' Play the simple tune using the sound command
+PlayTune
+
+' Restore default text color
+COLOR 7, 0
+
+' End of the program
+END
diff --git a/QBasic tutorial/Group 2/09.bas b/QBasic tutorial/Group 2/09.bas
new file mode 100755 (executable)
index 0000000..2e99357
--- /dev/null
@@ -0,0 +1,21 @@
+' This program demonstrates the use of string manipulation functions
+' in Microsoft QuickBasic. It shows how to extract substrings from a
+' given string using the LEFT$ and RIGHT$ functions.
+
+DEFSTR A-Z    ' Define all variables as strings to avoid type mismatches
+
+' Initialize a string variable with the value "software"
+SoftwareName$ = "software"
+
+' Print the full name of the software
+PRINT "Full software name: "; SoftwareName$
+
+' Extract and print the first four characters from the left of the string
+LEFTPart$ = LEFT$(SoftwareName$, 4)      ' Get the leftmost substring
+PRINT "Left part (first 4 characters): "; LEFTPart$
+
+' Extract and print the last four characters from the right of the string
+RIGHTPart$ = RIGHT$(SoftwareName$, 4)     ' Get the rightmost substring
+PRINT "Right part (last 4 characters): "; RIGHTPart$
+
+END    ' End of program
diff --git a/QBasic tutorial/Group 2/10.bas b/QBasic tutorial/Group 2/10.bas
new file mode 100755 (executable)
index 0000000..5df3e41
--- /dev/null
@@ -0,0 +1,37 @@
+CLS\r
+\r
+' This program demonstrates basic user input and string manipulation in QuickBasic.\r
+\r
+' Prompt the user to enter some text and store it in a variable called 'userInput$'.\r
+INPUT "Enter some text: ", userInput$\r
+\r
+' Print the text that the user entered in three different ways:\r
+' 1. Concatenating the prompt with the entered text using the '+' operator.\r
+' 2. Using a comma to separate the prompt from the entered text, which is more efficient.\r
+' 3. Using a colon to print on the same line without a space between the prompt and the input.\r
+PRINT "You entered: " + userInput$\r
+\r
+' Calculate the length of the entered text using the LEN function.\r
+' Then, print out the length, formatting it as a sentence.\r
+PRINT "Its length is" + STR$(LEN(userInput$)) + " characters."\r
+\r
+' Use a FOR loop to iterate from 1 to the length of the user input.\r
+' In each iteration, extract a substring from the left using the LEFT$ function\r
+' and print it to demonstrate string extraction from the beginning.\r
+FOR index = 1 TO LEN(userInput$)\r
+    PRINT "Leftmost " + STR$(index) + " character(s): " + LEFT$(userInput$, index)\r
+NEXT index\r
+\r
+' Print a blank line for better readability of the output.\r
+PRINT\r
+\r
+' Similar to the previous loop, but now we use the RIGHT$ function to extract\r
+' substrings from the right end of the user input, demonstrating string extraction\r
+' from the end of the string.\r
+FOR index = 1 TO LEN(userInput$)\r
+    PRINT "Rightmost " + STR$(index) + " character(s): " + RIGHT$(userInput$, index)\r
+NEXT index\r
+\r
+' End of the program.\r
+END\r
+\r
diff --git a/QBasic tutorial/Group 2/12.bas b/QBasic tutorial/Group 2/12.bas
new file mode 100755 (executable)
index 0000000..28b738d
--- /dev/null
@@ -0,0 +1,45 @@
+' This program demonstrates the basics of animation and control flow in QuickBasic.
+' It shows a simple text bouncing up and down on the screen, simulating a "jumping" effect.
+
+' Declare variables with descriptive names to hold the position and movement direction
+DIM yPosition AS INTEGER ' Current vertical position of the text
+DIM ySpeed AS INTEGER   ' Vertical speed (or direction) of the text
+
+' Initialize the starting position and speed
+yPosition = 10
+ySpeed = 1
+
+' Main animation loop
+DO
+    ' Clear the screen before drawing the next frame
+    CLS
+
+    ' Update the vertical position based on the current speed
+    yPosition = yPosition + ySpeed
+
+    ' Check if the text has hit the top boundary and change direction if it has
+    IF yPosition > 20 THEN
+        ySpeed = -1
+    ENDIF
+
+    ' Check if the text has hit the bottom boundary and change direction if it has
+    IF yPosition < 2 THEN
+        ySpeed = 1
+    ENDIF
+
+    ' Set the cursor position to the current vertical position
+    LOCATE yPosition
+
+    ' Print the "jumping" text at the new position
+    PRINT "This is jumping text";
+
+    ' Play a sound with a frequency that varies based on the vertical position
+    ' The frequency is calculated to give an audible effect as the text jumps
+    SOUND yPosition * 200 + 100, 1
+
+    ' Pause briefly before drawing the next frame (adjust this value for faster or slower animation)
+    DELAY 0.1
+LOOP
+
+' Note: The program will run indefinitely due to the DO LOOP structure.
+' To stop the program, you can press Ctrl+Break on most systems.
diff --git a/QBasic tutorial/Group 2/13.bas b/QBasic tutorial/Group 2/13.bas
new file mode 100755 (executable)
index 0000000..c7c507a
--- /dev/null
@@ -0,0 +1,54 @@
+' This program demonstrates basic animation and boundary checking in QuickBasic.\r
+' It simulates a simple ball bouncing around the screen.\r
+\r
+CLS ' Clear the screen before starting the animation\r
+\r
+' Initialize variables representing the ball's position and velocity\r
+DIM x AS INTEGER ' Ball's X coordinate\r
+DIM y AS INTEGER ' Ball's Y coordinate\r
+DIM xs AS INTEGER ' Ball's speed in the X direction\r
+DIM ys AS INTEGER ' Ball's speed in the Y direction\r
+\r
+x = 12 ' Initial X position of the ball\r
+y = 7  ' Initial Y position of the ball\r
+xs = 1  ' Initial velocity in the X direction (rightward)\r
+ys = 1  ' Initial velocity in the Y direction (downward)\r
+\r
+' Main animation loop\r
+DO\r
+    ' Erase the ball at its current position by printing a space\r
+    LOCATE y, x: PRINT " ";\r
+\r
+    ' Update the ball's position based on its velocities\r
+    x = x + xs\r
+    y = y + ys\r
+\r
+    ' Draw the ball at its new position\r
+    LOCATE y, x: PRINT "O";\r
+\r
+    ' Check if the ball hits the right or left boundaries and reverse X velocity\r
+    IF x >= 79 THEN\r
+        xs = -1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+    IF x <= 1 THEN\r
+        xs = 1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+\r
+    ' Check if the ball hits the bottom or top boundaries and reverse Y velocity\r
+    IF y >= 22 THEN\r
+        ys = -1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+    IF y <= 1 THEN\r
+        ys = 1\r
+        SOUND 1000, 1 ' Play a sound when hitting the boundary\r
+    END IF\r
+\r
+    ' Pause briefly to control the speed of the animation\r
+    SOUND 0, 1\r
+LOOP\r
+\r
+' The program will continue running indefinitely, creating an animated bouncing ball effect\r
+\r
diff --git a/QBasic tutorial/Group 2/14.bas b/QBasic tutorial/Group 2/14.bas
new file mode 100755 (executable)
index 0000000..4a0f1f9
--- /dev/null
@@ -0,0 +1,54 @@
+' This program demonstrates how to use the SOUND statement in QuickBasic
+' to produce different tones when pressing keys "0" through "9".
+' It also shows how to exit the program by pressing the Escape key.
+
+CLS
+PRINT "Press keys '0'-'9' for different sounds."
+PRINT "Press Esc to exit the program."
+
+' Start an infinite loop to continuously check for user input
+DO
+    ' Read a single character from the keyboard
+    a$ = INPUT$(1)
+
+    ' Play a sound corresponding to the key pressed
+    SELECT CASE a$
+        CASE "0"
+            ' Generate a low-pitched tone
+            SOUND 1900, 2
+        CASE "1"
+            ' Generate a slightly higher pitched tone
+            SOUND 1000, 2
+        CASE "2"
+            ' Generate a tone with a frequency of 1100 Hz
+            SOUND 1100, 2
+        CASE "3"
+            ' Generate a tone with a frequency of 1200 Hz
+            SOUND 1200, 2
+        CASE "4"
+            ' Generate a tone with a frequency of 1300 Hz
+            SOUND 1300, 2
+        CASE "5"
+            ' Generate a tone with a frequency of 1400 Hz
+            SOUND 1400, 2
+        CASE "6"
+            ' Generate a tone with a frequency of 1500 Hz
+            SOUND 1500, 2
+        CASE "7"
+            ' Generate a high-pitched tone
+            SOUND 1600, 2
+        CASE "8"
+            ' Generate a very high-pitched tone
+            SOUND 1700, 2
+        CASE "9"
+            ' Generate the highest pitched tone available
+            SOUND 1800, 2
+        CASE CHR$(27)
+            ' Check if the Escape key is pressed to exit the program
+            SYSTEM
+        CASE ELSE
+            ' If any other key is pressed, do nothing
+    END SELECT
+
+    ' Loop indefinitely until the user decides to exit
+LOOP
diff --git a/QBasic tutorial/Group 2/15.bas b/QBasic tutorial/Group 2/15.bas
new file mode 100755 (executable)
index 0000000..0f8b2b8
--- /dev/null
@@ -0,0 +1,26 @@
+' This program demonstrates how to use a FOR loop and the CHR$ function
+' in QuickBasic to print out characters from the ASCII table.
+
+CLS ' Clears the screen before printing
+
+' The FOR loop iterates over ASCII values starting from 32 (space character)
+' up to 255, which is beyond the standard ASCII range but includes extended
+' ASCII characters in QuickBasic.
+FOR a = 32 TO 255
+    ' CHR$ function converts an ASCII value to its corresponding character
+    PRINT " " + CHR$(a); ' Prints each character with a leading space for readability
+NEXT a
+
+' Print two new lines to separate the ASCII table from the greeting message
+PRINT
+PRINT
+
+' Greet the user in a friendly manner
+' The CHR$(1) represents the Start of Header (SOH) control character, which is
+' typically not visible and may be interpreted differently depending on the
+' environment. It is used here for demonstration purposes to show how
+' non-printable characters can be included in strings.
+PRINT "Hi there! " + CHR$(1)
+
+' End of the program
+END
diff --git a/QBasic tutorial/Group 2/16.bas b/QBasic tutorial/Group 2/16.bas
new file mode 100755 (executable)
index 0000000..3ff22a5
--- /dev/null
@@ -0,0 +1,40 @@
+' This program demonstrates how to capture and process keyboard input in QuickBASIC.
+' It listens for a key press, then prints out the character and its ASCII code.
+' Special keys like Escape, Enter, Backspace, Tabulator, and Space are given custom names.
+
+CLS ' Clears the screen before starting the program
+PRINT "Press any key..." ' Prompts the user to press a key
+
+' Main loop starts here
+DO
+    ' Capture a single character of input from the user
+    a$ = INPUT$(1)
+
+    ' Print the pressed key, if it is a printable character (ASCII code > 32)
+    PRINT "Pressed key was: ";
+    IF ASC(a$) > 32 THEN
+        PRINT a$
+    END IF
+
+    ' Check for special keys and print their names
+    SELECT CASE ASC(a$)
+        CASE 27 ' ASCII code for Escape key
+            PRINT "Escape"
+        CASE 13 ' ASCII code for Enter key
+            PRINT "Enter"
+        CASE 8 ' ASCII code for Backspace key
+            PRINT "Backspace"
+        CASE 9 ' ASCII code for Tabulator key
+            PRINT "Tabulator"
+        CASE 32 ' ASCII code for Space key
+            PRINT "Space"
+        CASE ELSE
+            ' If the key is not special, print its ASCII character
+            IF ASC(a$) > 32 THEN
+                PRINT a$
+            END IF
+    END SELECT
+
+    ' Print the ASCII code of the pressed key
+    PRINT "ASCII code is: "; ASC(a$)
+LOOP ' Continue listening for more key presses
diff --git a/QBasic tutorial/Group 2/17.bas b/QBasic tutorial/Group 2/17.bas
new file mode 100755 (executable)
index 0000000..899390e
--- /dev/null
@@ -0,0 +1,58 @@
+' This program demonstrates how to handle keyboard input in QuickBasic
+' and move a character around the screen using the numeric keypad.
+
+CLS
+
+' Inform the user about the controls and how to exit the program
+PRINT "Use keys 4, 8, 6, 2 for movement, make sure the NumLock is on"
+PRINT "ESC to exit"
+
+' Clear a line for better visibility
+PRINT " "
+
+' Wait for the user to press any key to start
+PRINT "Press any key to continue..."
+a$ = INPUT$(1)
+
+' Set the text color to bright yellow
+COLOR 14
+
+' Initialize the starting position of the character
+x = 40
+y = 10
+
+' Main loop for handling input and drawing the character
+DO
+    CLS ' Clear the screen before redrawing
+
+    ' Set the cursor position to the current character coordinates
+    LOCATE y, x
+
+    ' Print the character at the current position
+    PRINT CHR$(2); ' The semicolon prevents moving to the next line
+
+    ' Read a single character of input without waiting
+    a$ = INPUT$(1)
+
+    ' Check for movement inputs and update the character's position
+    SELECT CASE a$
+        CASE "4" ' Left arrow
+            x = x - 1
+        CASE "6" ' Right arrow
+            x = x + 1
+        CASE "8" ' Up arrow
+            y = y - 1
+        CASE "2" ' Down arrow
+            y = y + 1
+        CASE CHR$(27) ' Escape key
+            ' Exit the program
+            SYSTEM
+    END SELECT
+
+    ' Prevent the character from going off-screen
+    IF x < 1 THEN x = 1
+    IF x > 80 THEN x = 80
+    IF y < 1 THEN y = 1
+    IF y > 25 THEN y = 25
+
+LOOP ' Continue the main loop indefinitely
diff --git a/QBasic tutorial/Group 2/18.bas b/QBasic tutorial/Group 2/18.bas
new file mode 100755 (executable)
index 0000000..9700d82
--- /dev/null
@@ -0,0 +1,56 @@
+CLS
+
+' Main program loop starts here
+DO
+    ' Clear the screen and print the menu options
+    CLS
+    PRINT "******** Select action: ********"
+    PRINT " "
+    PRINT "1 - Exit program"
+    PRINT "2 - Make a sound"
+    PRINT "3 - Draw a box"
+
+    ' Prompt the user to enter their choice and store it in variable 'userChoice'
+    INPUT "Enter your choice (1-3): ", userChoice
+
+    ' Exit the program if the user chooses option 1
+    IF userChoice = 1 THEN
+        PRINT "Exiting program..."
+        EXIT DO
+    END IF
+
+    ' Play a sound if the user chooses option 2
+    IF userChoice = 2 THEN
+        ' Generate a sound with a frequency of 2000 Hz for 2 seconds
+        SOUND 2000, 2
+
+    ' Draw a box if the user chooses option 3
+    ELSEIF userChoice = 3 THEN
+        ' Outer loop to draw the top and bottom edges of the box
+        FOR row = 1 TO 15
+            ' Inner loop to draw the left and right edges of the box
+            FOR col = 1 TO 50
+                PRINT "#";
+            NEXT col
+            ' Move to the next line after drawing each row
+            PRINT
+        NEXT row
+
+    ' Inform the user if they have entered a number greater than 3
+    ELSEIF userChoice > 3 THEN
+        PRINT "Number too large. Please enter a value between 1 and 3."
+
+    ' Inform the user if they have entered a number less than 1
+    ELSEIF userChoice < 1 THEN
+        PRINT "Number too small. Please enter a value between 1 and 3."
+    END IF
+
+    ' Wait for the user to press a key before continuing
+    PRINT "Press any key to continue..."
+    WHILE INKEY$ = ""
+        ' Do nothing, just wait for a key press
+    WEND
+
+LOOP WHILE TRUE
+
+' End of program
diff --git a/QBasic tutorial/Group 3/00.bas b/QBasic tutorial/Group 3/00.bas
new file mode 100755 (executable)
index 0000000..91414f8
--- /dev/null
@@ -0,0 +1,7 @@
+SCREEN 13    ' set video mode 320 x 200   256 colors\r
+\r
+PRINT "Hello..."\r
+\r
+PSET (160, 100), 10    ' draws a point\r
+                       ' x=160  y=100 color=10\r
+\r
diff --git a/QBasic tutorial/Group 3/01.bas b/QBasic tutorial/Group 3/01.bas
new file mode 100755 (executable)
index 0000000..938bc41
--- /dev/null
@@ -0,0 +1,9 @@
+SCREEN 13\r
+\r
+FOR y = 50 TO 150\r
+  FOR x = 100 TO 200\r
+    PSET (x, y), 10\r
+  NEXT x\r
+  SOUND y, 1\r
+NEXT y\r
+\r
diff --git a/QBasic tutorial/Group 3/02.bas b/QBasic tutorial/Group 3/02.bas
new file mode 100755 (executable)
index 0000000..11df674
--- /dev/null
@@ -0,0 +1,25 @@
+DECLARE SUB box (x1!, y1!, x2!, y2!, c!)\r
+\r
+' Press F2 to see submodules\r
+' Nazmi F2 xtob uvidet SUB moduli\r
+' Vajuta F2 et n\84ha SUB mooduleid\r
+\r
+\r
+SCREEN 13\r
+\r
+box 10, 10, 100, 100, 15\r
+\r
+box 30, 80, 300, 120, 11\r
+\r
+box 140, 20, 180, 180, 10\r
+\r
+SUB box (x1, y1, x2, y2, c)\r
+\r
+FOR y = y1 TO y2\r
+  FOR x = x1 TO x2\r
+    PSET (x, y), c\r
+  NEXT x\r
+NEXT y\r
+\r
+END SUB\r
+\r
diff --git a/QBasic tutorial/Group 3/03.bas b/QBasic tutorial/Group 3/03.bas
new file mode 100755 (executable)
index 0000000..8ddb8b2
--- /dev/null
@@ -0,0 +1,6 @@
+SCREEN 13\r
+\r
+LINE (10, 10)-(200, 100), 14\r
+\r
+CIRCLE (100, 100), 80, 10\r
+\r
diff --git a/QBasic tutorial/Group 3/04.bas b/QBasic tutorial/Group 3/04.bas
new file mode 100755 (executable)
index 0000000..a806541
--- /dev/null
@@ -0,0 +1,8 @@
+SCREEN 13\r
+\r
+LINE (10, 10)-(50, 50), 14              ' line\r
+\r
+LINE (100, 10)-(150, 50), 14, B         ' box\r
+\r
+LINE (200, 10)-(250, 50), 14, BF        ' filled box\r
+\r
diff --git a/QBasic tutorial/Group 3/05.bas b/QBasic tutorial/Group 3/05.bas
new file mode 100755 (executable)
index 0000000..3e87408
--- /dev/null
@@ -0,0 +1,6 @@
+SCREEN 13\r
+\r
+FOR x = 0 TO 255\r
+  LINE (x, 50)-(x, 100), x\r
+NEXT x\r
+\r
diff --git a/QBasic tutorial/Group 3/06.bas b/QBasic tutorial/Group 3/06.bas
new file mode 100755 (executable)
index 0000000..5bb13d3
--- /dev/null
@@ -0,0 +1,12 @@
+SCREEN 13\r
+\r
+\r
+CIRCLE (160, 100), 80, 15\r
+LINE (100, 10)-(200, 180), 15\r
+\r
+PRINT "press any key..."\r
+\r
+a$ = INPUT$(1)\r
+\r
+PAINT (180, 100), 15\r
+\r
diff --git a/QBasic tutorial/Group 3/07.bas b/QBasic tutorial/Group 3/07.bas
new file mode 100755 (executable)
index 0000000..3c7ba6c
--- /dev/null
@@ -0,0 +1,23 @@
+DECLARE SUB sihik (x!, y!)\r
+SCREEN 13\r
+\r
+' Press F2 to see submodules list\r
+' Vajuta F2 at n\84ha sub moodulite listi\r
+' nazmi F2 xtobe uvidjet sub spisok sub modulei\r
+\r
+\r
+sihik 100, 100\r
+sihik 200, 50\r
+sihik 180, 150\r
+\r
+SUB sihik (x, y)\r
+\r
+CIRCLE (x, y), 10, 15\r
+CIRCLE (x, y), 20, 15\r
+CIRCLE (x, y), 30, 15\r
+\r
+LINE (x, y - 50)-(x, y + 50), 15\r
+LINE (x - 50, y)-(x + 50, y), 15\r
+\r
+END SUB\r
+\r
diff --git a/QBasic tutorial/Group 3/08.bas b/QBasic tutorial/Group 3/08.bas
new file mode 100755 (executable)
index 0000000..deff209
--- /dev/null
@@ -0,0 +1,13 @@
+SCREEN 13\r
+\r
+\r
+FOR x = 0 TO 319\r
+\r
+  y = SIN(x / 10) * 50 + 100\r
+  PSET (x, y), 14\r
+\r
+  y = COS(x / 10) * 50 + 100\r
+  PSET (x, y), 12\r
+\r
+NEXT x\r
+\r
diff --git a/QBasic tutorial/Group 3/09.bas b/QBasic tutorial/Group 3/09.bas
new file mode 100755 (executable)
index 0000000..eaea7f8
--- /dev/null
@@ -0,0 +1,13 @@
+SCREEN 13\r
+\r
+pi = 3.14\r
+mi = 7       ' amount of points on circular shape\r
+\r
+FOR a = 0 TO pi * 2 STEP pi * 2 / mi\r
+\r
+  x = SIN(a) * 50 + 100\r
+  y = COS(a) * 50 + 100\r
+  PSET (x, y), 10\r
+\r
+NEXT a\r
+\r
diff --git a/QBasic tutorial/Group 3/10.bas b/QBasic tutorial/Group 3/10.bas
new file mode 100755 (executable)
index 0000000..fc4f497
--- /dev/null
@@ -0,0 +1,21 @@
+SCREEN 13\r
+\r
+FOR i = 0 TO 320 STEP 10\r
+  LINE (0, i)-(319, i), 5\r
+  LINE (i, 0)-(i, 199), 5\r
+NEXT i\r
+\r
+LINE (0, 100)-(319, 100), 10\r
+\r
+PRINT "press a key..."\r
+a$ = INPUT$(1)\r
+\r
+y = 100\r
+ys = -1\r
+FOR t = 0 TO 300\r
+  PSET (t, y), 14\r
+  ys = ys + .01\r
+  y = y + ys\r
+  SOUND 300 - y, .1\r
+NEXT t\r
+\r
diff --git a/QBasic tutorial/Group 3/11.bas b/QBasic tutorial/Group 3/11.bas
new file mode 100755 (executable)
index 0000000..c4e4c5a
--- /dev/null
@@ -0,0 +1,10 @@
+CLS\r
+\r
+a = -12.7\r
+\r
+PRINT "normal: ", a\r
+PRINT "rounded: ", INT(a)\r
+PRINT "absolute: ", ABS(a)\r
+\r
+PRINT "reminder of 10 / 4 is: ", 10 MOD 4\r
+\r
diff --git a/QBasic tutorial/group1/00.bas b/QBasic tutorial/group1/00.bas
deleted file mode 100755 (executable)
index fc62f12..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-' This program demonstrates a basic "Hello World" example in QuickBasic.
-' It is designed to be simple and easy to understand for novice programmers.
-
-' The following line prints a greeting message to the console.
-PRINT "Hello world!"
-
-' When you run this program, it will output the string "Hello world!" to the screen.
-' This is a traditional first step in learning any new programming language.
-
-' To execute this program, press F5 while in the QuickBasic editor environment.
diff --git a/QBasic tutorial/group1/01.bas b/QBasic tutorial/group1/01.bas
deleted file mode 100755 (executable)
index 0760259..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-' This QuickBasic program demonstrates basic arithmetic operations
-' and the use of variables. It will perform a series of calculations
-' on a single variable and print the results after each operation.
-
-CLS ' Clears the screen to provide a clean output area
-
-' Initialize a variable with the value 3
-DIM initialValue AS INTEGER
-initialValue = 3
-
-' Print the current value of initialValue
-PRINT "The initial value is: "; initialValue
-
-' Perform multiplication and assign the result back to initialValue
-initialValue = initialValue * 2
-
-' Print the new value after multiplication
-PRINT "After doubling, the value is: "; initialValue
-
-' Perform subtraction and decrease initialValue by 1
-initialValue = initialValue - 1
-
-' Print the final value after subtraction
-PRINT "After decrementing by 1, the value is: "; initialValue
diff --git a/QBasic tutorial/group1/02.bas b/QBasic tutorial/group1/02.bas
deleted file mode 100755 (executable)
index ccf5019..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-' This program demonstrates basic arithmetic operations in QuickBasic
-
-CLS ' Clears the screen to provide a clean output area
-
-' Declare a variable 'a' and assign it the value of 7
-DIM a AS INTEGER
-a = 7
-
-' Print the current value of 'a' to the console
-PRINT "The value contained in variable 'a' is: "; a
-
-' Perform a series of arithmetic operations on the value of 'a'
-' and print the result
-PRINT "Performing some calculations with 'a':";
-PRINT (a + 2.1234) / 3 * 4 - 6
-
-' Explanation of the calculation:
-' 1. Add 2.1234 to 'a'
-' 2. Divide the result by 3
-' 3. Multiply the new result by 4
-' 4. Subtract 6 from the final result
diff --git a/QBasic tutorial/group1/03.bas b/QBasic tutorial/group1/03.bas
deleted file mode 100755 (executable)
index 6f6cebe..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-' This program demonstrates how to use semicolon and comma as separators\r
-' in PRINT statements within Microsoft QuickBasic.\r
-\r
-CLS ' Clears the screen before starting the program\r
-\r
-' Semicolon Separator Example\r
-\r
-' The semicolon is used to print multiple items on the same line, without\r
-' advancing to a new line after each item. It is useful for formatting output\r
-' in a single line of text.\r
-\r
-PRINT "Semicolon separator:"\r
-PRINT 12; 314; 122; 1; 43      ' Prints numbers separated by semicolons on the same line\r
-PRINT 312; 4; 1; 3111; 3       ' Continues printing more numbers on the next line\r
-PRINT 3; 2344; 12231; 1; 12333 ' Final set of numbers printed on the last line\r
-\r
-' Print an empty line for better readability\r
-PRINT ' This statement prints an empty line to separate different sections\r
-\r
-' Comma Separator Example\r
-\r
-' The comma is used as a separator in PRINT statements to print multiple items,\r
-' each followed by a space and advancing to the next tab column (default is 14\r
-' characters apart). If there are more items than columns, it will start\r
-' a new line.\r
-\r
-PRINT "Comma separator:"\r
-PRINT 12, 314, 122, 1, 43      ' Prints numbers separated by commas, with spacing\r
-PRINT 312, 4, 1, 3111, 3       ' Numbers are printed in tabular form\r
-PRINT 3, 2344, 12231, 1, 12333 ' Continues the tabular output\r
-\r
-' End of program\r
-END ' This statement marks the end of the QuickBasic program\r
-\r
diff --git a/QBasic tutorial/group1/04.bas b/QBasic tutorial/group1/04.bas
deleted file mode 100755 (executable)
index dd1a43d..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-' This program prompts the user to enter a number and then prints that number back to the screen.
-' It demonstrates basic input/output operations in QuickBasic.
-
-DEFINT A-Z ' Declare all variables as integers for simplicity
-
-' Declare a variable to store the user's input
-DIM num AS INTEGER
-
-' Use the INPUT statement to prompt the user and read their input
-PRINT "Please enter a number:";
-INPUT num
-
-' Print a message to the screen along with the entered number
-PRINT "You entered: "; num
-
-' End of program
-END
diff --git a/QBasic tutorial/group1/05.bas b/QBasic tutorial/group1/05.bas
deleted file mode 100755 (executable)
index 5d56b0c..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-REM **** Guess a Number Game ****
-
-DEFINT A-Z ' Define all variables as integers for performance and clarity
-
-' Main game loop
-DO
-    ' Prompt the user to enter a number
-    INPUT "Enter a number between 1 and 10: "; guess
-
-    ' Check if the user guessed the correct number
-    IF guess = 5 THEN
-        ' If the guess is correct, congratulate the user and exit the loop
-        PRINT "Correct!!! You've guessed the secret number."
-        EXIT DO
-    ELSEIF guess < 5 THEN
-        ' If the guess is too low, prompt the user to try a higher number
-        PRINT "Try a bigger number."
-    ELSEIF guess > 5 THEN
-        ' If the guess is too high, prompt the user to try a lower number
-        PRINT "Try a smaller number."
-    END IF
-LOOP
-
-' End of the program
-PRINT "Thank you for playing! Goodbye."
-END
diff --git a/QBasic tutorial/group1/06.bas b/QBasic tutorial/group1/06.bas
deleted file mode 100755 (executable)
index 4237cf8..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-CLS ' Clear the screen
-
-' This program demonstrates a simple counting loop in QuickBasic.
-' It will print the current value of 'a' and increment it by 1 each time.
-' The loop continues until 'a' is no longer less than 10.
-
-DIM a AS INTEGER ' Declare variable 'a' as an integer
-
-' Initialize the counter variable 'a' to start at 1
-a = 1
-
-' Start of the counting loop
-DO WHILE a < 10
-    ' Print the current value of 'a' with a label
-    PRINT "current:"; a
-
-    ' Increment 'a' by 1
-    a = a + 1
-LOOP
-
-' The program will end after the loop finishes
-END
diff --git a/QBasic tutorial/group1/07.bas b/QBasic tutorial/group1/07.bas
deleted file mode 100755 (executable)
index 9bb214b..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-' This program demonstrates a simple FOR loop in Microsoft QuickBasic
-
-CLS ' Clears the screen, preparing it for output
-
-' We are about to use a FOR loop to print numbers from 1 to 10
-FOR i = 1 TO 10 ' Initialize a counter variable 'i' starting at 1
-    ' For each iteration of the loop, print the current value of 'i'
-    PRINT "current: "; i ' Outputs the message with the current number
-NEXT i ' Increment 'i' by 1 and repeat the loop until 'i' is no longer less than or equal to 10
-
-' The program has now finished executing and will end
-END ' This marks the end of the QuickBasic program
diff --git a/QBasic tutorial/group1/08.bas b/QBasic tutorial/group1/08.bas
deleted file mode 100755 (executable)
index 8df64b6..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-' This program demonstrates how to use a FOR loop and the SOUND statement
-' in QuickBasic. It plays a series of tones at increasing frequencies
-' from 100 Hz to 1000 Hz, in steps of 50 Hz, with each tone lasting for
-' one duration unit as defined by the SOUND statement.
-
-CLS ' Clears the screen before starting the program
-
-' Initialize the frequency variable to the starting value
-LET frequency = 100
-
-' Loop from the initial frequency (100 Hz) to the maximum frequency (1000 Hz),
-' increasing by 50 Hz on each iteration
-FOR frequency = 100 TO 1000 STEP 50
-    ' Print the current frequency value to the console
-    PRINT "Current Frequency:"; frequency; " Hz"
-
-    ' Play a sound at the specified frequency and duration
-    ' The SOUND statement takes two arguments: frequency and duration
-    SOUND frequency, 1 ' The duration is set to 1 (shortest possible sound)
-NEXT frequency
-
-' End of program execution
-END
diff --git a/QBasic tutorial/group1/09.bas b/QBasic tutorial/group1/09.bas
deleted file mode 100755 (executable)
index 1b96f04..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-REM This program demonstrates how to generate random numbers\r
-REM and use them to create sound effects in QuickBasic.\r
-\r
-CLS ' Clear the screen before starting the program\r
-\r
-' Define constants for the range of random numbers\r
-FOR i = 1 TO 20 ' Loop 20 times to generate and play 20 random sounds\r
-    ' Generate a random floating-point number between LOWER_BOUND and UPPER_BOUND\r
-    n = RND * 1000\r
-    ' Print the generated random number to the screen\r
-    PRINT "Random number: "; n\r
-\r
-    ' Play a sound with a frequency based on the random number\r
-    ' The QuickBasic SOUND statement takes two arguments: frequency and duration\r
-    ' We add 40 to the random number to shift the frequency range\r
-    ' so that it is more audible\r
-    SOUND n + 40, 1 ' Play the sound for a short duration (1/89th of a second)\r
-\r
-NEXT i\r
-\r
-END ' End the program\r
-\r
diff --git a/QBasic tutorial/group1/10.bas b/QBasic tutorial/group1/10.bas
deleted file mode 100755 (executable)
index ab4120b..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-' This example program demonstrates how to use the WIDTH and COLOR\r
-' statements in QuickBasic to change the text font size and text colors.\r
-\r
-' Set the text window to a smaller font size suitable for displaying\r
-' 50 lines of text within an 80-column width.\r
-WIDTH 80, 50\r
-\r
-' Define constants for the number of colors available in standard\r
-' QuickBasic color palette.\r
-CONST NumColors = 32\r
-\r
-' Loop through all possible colors (0 to 31) and display a message\r
-' with each color to illustrate the different text color options.\r
-FOR colorIndex = 0 TO NumColors - 1\r
-    ' Set the current text color using the COLOR statement.\r
-    ' Colors range from 0 to 15 are solid, while colors 16 to 31\r
-    ' will blink slowly or quickly depending on the terminal.\r
-    COLOR colorIndex\r
-\r
-    ' Print a message indicating which color number is currently being used.\r
-    ' Note that color numbers 16 and above will produce blinking text.\r
-    PRINT "This is text color number "; colorIndex; "."\r
-\r
-NEXT colorIndex\r
-\r
diff --git a/QBasic tutorial/group1/11.bas b/QBasic tutorial/group1/11.bas
deleted file mode 100755 (executable)
index e6f69e6..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-' This program demonstrates how to use the COLOR statement and LOCATE function
-' in Microsoft QuickBasic to change the text color and cursor position
-' on the console screen.
-
-CLS ' Clears the screen before starting
-
-' Set the text color to yellow (color code 14) and position the cursor
-' at row 1, column 50. Then print a message at that location.
-COLOR 14
-LOCATE 1, 50 ' Sets the cursor location to <row=1, column=50>
-PRINT "Yellow text at 1, 50"
-
-' Change the text color to pink (color code 12) and move the cursor
-' to row 6, column 5. Print a message with the new color and position.
-COLOR 12
-LOCATE 6, 5 ' Sets the cursor location to <row=6, column=5>
-PRINT "Pink text at 6, 5"
-
-' Update the text color to green (color code 10) and set the cursor
-' to row 20, column 40. Display a message at this new location.
-COLOR 10
-LOCATE 20, 40 ' Sets the cursor location to <row=20, column=40>
-PRINT "Green text at 20, 40"
-
-' The program finishes execution here. Users can add more statements
-' below this line to experiment with different colors and positions.
-END ' End of the program
diff --git a/QBasic tutorial/group1/12.bas b/QBasic tutorial/group1/12.bas
deleted file mode 100755 (executable)
index 3aa9c36..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-' This program demonstrates the use of FOR loops, color manipulation,
-' and string output in QuickBasic. It also shows how to prevent the
-' cursor from moving to a new line after printing a string.
-
-CLS ' Clears the screen before starting the program
-
-' The first loop demonstrates changing text colors using the COLOR statement
-' inside a FOR loop, which iterates from 1 to 15 (the number of available
-' color attributes in QuickBasic).
-FOR ColorIndex = 1 TO 15
-    COLOR ColorIndex ' Set the current text color to the loop index
-    PRINT "This is a test" ' Print the string with the new color
-NEXT ColorIndex
-
-PRINT ' Print a blank line for better readability
-
-' The second loop does the same as the first one, but it uses a semicolon
-' at the end of the PRINT statement to prevent the cursor from moving
-' to the start of a new line after each string output. This results in
-' all strings being printed on the same line.
-FOR ColorIndex = 1 TO 15
-    COLOR ColorIndex ' Change the text color for each iteration
-    PRINT "This is a test"; ' Print the string and keep the cursor on the same line
-NEXT ColorIndex
diff --git a/QBasic tutorial/group1/13.bas b/QBasic tutorial/group1/13.bas
deleted file mode 100755 (executable)
index c778556..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-' This example QuickBasic program demonstrates the difference between
-' normal division and integer division with rounding.
-
-CLS                       ' Clears the screen to provide a clean output area
-
-' Perform normal division which results in a floating-point number
-' and print the result
-PRINT "Normal division (70 / 4):"; 70 / 4
-
-' Explain the use of backslash (\) for integer division with rounding
-' Perform integer division with rounding and print the result
-PRINT "Integer division with rounding (70 \ 4):"; 70 \ 4
-
-' Provide a brief conclusion to summarize what was demonstrated
-PRINT
-PRINT "In QuickBasic, '/' performs normal division, while '\' does integer division"
-PRINT "and rounds the result to the nearest whole number."
-
-END                       ' End of program
diff --git a/QBasic tutorial/group1/15.bas b/QBasic tutorial/group1/15.bas
deleted file mode 100755 (executable)
index 242c221..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-' This program demonstrates the use of nested FOR loops in QuickBasic\r
-' to draw a simple pattern on the screen.\r
-\r
-CLS ' Clears the screen and prepares for output\r
-\r
-' Outer loop will run 15 times, representing rows\r
-FOR row = 1 TO 15\r
-\r
-    ' Inner loop will run 60 times, representing columns within each row\r
-    FOR column = 1 TO 60\r
-        PRINT "#"; ' Print a '#' character followed by no space to create a continuous line\r
-    NEXT column\r
-\r
-    ' After completing one row, print a newline character to move to the next line\r
-    PRINT\r
-\r
-NEXT row\r
-\r
diff --git a/QBasic tutorial/group1/16.bas b/QBasic tutorial/group1/16.bas
deleted file mode 100755 (executable)
index 71f1eaf..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-' QuickBasic example program to demonstrate the use of nested loops
-' and how to control the flow of a loop using the STEP keyword.
-
-CLS ' Clears the screen before starting the program
-
-' This outer loop will iterate from 1 to 10
-FOR b = 1 TO 10
-    ' The inner loop will print "A" b times, where b is the current
-    ' value of the outer loop iterator
-    FOR a = 1 TO b
-        PRINT "A"; ' Print "A" followed by a semicolon to prevent newline
-    NEXT a
-
-    ' After each inner loop iteration, print a newline to start the next line
-    PRINT
-NEXT b
-
-' Print a blank line to separate the two parts of the demonstration
-PRINT
-
-' This outer loop will iterate from 60 to 0, decrementing by 8 each time
-FOR b = 60 TO 0 STEP -8
-    ' The inner loop will print "B" b times, where b is the current
-    ' value of the outer loop iterator
-    FOR a = 1 TO b
-        PRINT "B"; ' Print "B" followed by a semicolon to prevent newline
-    NEXT a
-
-    ' After each inner loop iteration, print a newline to start the next line
-    PRINT
-NEXT b
-
-' End of the program
-END
diff --git a/QBasic tutorial/group1/17.bas b/QBasic tutorial/group1/17.bas
deleted file mode 100755 (executable)
index b5e5f35..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-' This example QuickBasic program demonstrates how to use the built-in
-' timer, as well as how to display the current system time and date.
-' It also shows a simple loop structure and the use of the CLS statement
-' to clear the screen.
-
-' To stop the program, press CTRL + PAUSE/BREAK.
-
-DO
-    ' Clear the screen to provide a clean display for each iteration.
-    CLS
-
-    ' Retrieve and print the current value of the system timer.
-    ' The TIMER function returns the number of seconds that have
-    ' elapsed since midnight, not counting leap seconds.
-    PRINT "System Timer: "; TIMER; " seconds since midnight."
-
-    ' Retrieve and print the current system time using TIME$.
-    ' TIME$ returns a string in the format "HH:MM:SS".
-    PRINT "Current System Time: "; TIME$; "."
-
-    ' Retrieve and print the current system date using DATE$.
-    ' DATE$ returns a string in the format "M/D/YYYY" or "DD/MM/YYYY"
-    ' depending on regional settings.
-    PRINT "Current System Date: "; DATE$; "."
-
-    ' Pause for a moment to allow the user to see the output before
-    ' it is cleared again in the next iteration of the loop.
-    ' The Sleep statement requires including the QB.BI library.
-    SLEEP 1
-
-LOOP
diff --git a/QBasic tutorial/group1/18.bas b/QBasic tutorial/group1/18.bas
deleted file mode 100755 (executable)
index 0aec40a..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-' This example program demonstrates the use of the RND function
-' to generate random numbers in Microsoft QuickBasic.
-
-' Clear the screen before starting the program
-CLS
-
-' The first loop will print ten random numbers. However, these
-' numbers may not seem truly random because the random number
-' generator needs to be seeded with a varying value.
-
-PRINT "First group of 'random' numbers without seeding:"
-FOR b = 1 TO 10
-    PRINT RND
-NEXT b
-
-' Print an empty line for better readability between the two groups
-PRINT
-
-' Seed the random number generator using the TIMER function, which
-' returns the number of seconds since midnight. This ensures that
-' subsequent calls to RND will yield different sequences of numbers
-' each time the program is run after being restarted.
-RANDOMIZE TIMER
-PRINT "Second group of truly random numbers with seeding:"
-
-' Now, print another ten random numbers after seeding the generator
-FOR b = 1 TO 10
-    PRINT RND
-NEXT b
-
-' End of program
diff --git a/QBasic tutorial/group1/19.bas b/QBasic tutorial/group1/19.bas
deleted file mode 100755 (executable)
index 536364b..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-' This program demonstrates how to use the QuickBasic functions RND (random number generator),\r
-' COLOR (sets text and background color), LOCATE (positions the cursor on the screen), PRINT (displays text),\r
-' SOUND (generates a tone through the PC speaker)\r
-\r
-CLS ' Clears the screen before starting the program\r
-\r
-' Generate random coordinates (x, y) for text placement on the screen\r
-' and a random color (c) for the text.\r
-' The screen has 80 columns (0-79) and 25 lines (0-24), but we start counting from 1.\r
-\r
-\r
-' INKEY$ returns a string containing any keystroke; if no key is pressed, it returns an empty string\r
-DO WHILE INKEY$ = ""\r
-    x = INT(RND * 80) + 1  ' Random column, ensuring it is within the screen width\r
-    y = INT(RND * 25) + 1  ' Random line, ensuring it is within the screen height\r
-    c = INT(RND * 16)      ' Random color index (0-15), where 0 is black and 15 is white\r
-\r
-    ' Set the text color to the randomly chosen color\r
-    COLOR c\r
-\r
-    ' Position the cursor at the random coordinates\r
-    LOCATE y, x\r
-\r
-    ' Print an "x" character at the current cursor position\r
-    PRINT "x"; ' The semicolon prevents advancing to the next line\r
-\r
-    ' Generate a sound with a frequency based on the x coordinate and a duration of 0.1 seconds\r
-    SOUND x * 100 + 100, 1\r
-\r
-LOOP\r
-\r
diff --git a/QBasic tutorial/group2/01.bas b/QBasic tutorial/group2/01.bas
deleted file mode 100755 (executable)
index 39b091d..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-CLS\r
-\r
-'     incareasing frequancy; suurenev sagedus; uvelicevajusijesja xastota\r
-SOUND 1000, 2\r
-SOUND 2000, 2\r
-SOUND 3000, 2\r
-\r
-'     incareasing length; suurenev kestvus; uvelicevajusijesja dlitelnost\r
-SOUND 0, 10\r
-SOUND 1000, 1\r
-\r
-SOUND 0, 10\r
-SOUND 1000, 2\r
-\r
-SOUND 0, 10\r
-SOUND 1000, 4\r
-\r
-SOUND 0, 10\r
-SOUND 1000, 8\r
-\r
diff --git a/QBasic tutorial/group2/02.bas b/QBasic tutorial/group2/02.bas
deleted file mode 100755 (executable)
index 39b2c4e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-1\r
-s = s + 1       ' speed\r
-PRINT s; "x"\r
-\r
-FOR a = 100 TO 1000 STEP s\r
-  SOUND a, .1\r
-NEXT a\r
-\r
-FOR a = 1000 TO 100 STEP -s\r
-  SOUND a, .1\r
-NEXT a\r
-\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/03.bas b/QBasic tutorial/group2/03.bas
deleted file mode 100755 (executable)
index f5de99b..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-CLS\r
-\r
-INPUT "Hi, what is your name: ", a$\r
-COLOR 10\r
-PRINT "Hello " + a$ + " !"\r
-PRINT a$ + " how are you?"\r
-\r
diff --git a/QBasic tutorial/group2/04.bas b/QBasic tutorial/group2/04.bas
deleted file mode 100755 (executable)
index a428f1e..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-CLS\r
-\r
-a$ = "-two-"\r
-PRINT a$\r
-\r
-a$ = a$ + "three"\r
-PRINT a$\r
-\r
-a$ = "one" + a$\r
-PRINT a$\r
-\r
diff --git a/QBasic tutorial/group2/05.bas b/QBasic tutorial/group2/05.bas
deleted file mode 100755 (executable)
index e9623c6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-CLS\r
-\r
-INPUT "Horisontal size (2 to 79):", hs\r
-INPUT "Vertical size (2 to 23):", vs\r
-\r
-\r
-FOR i = 1 TO hs         ' make top of the box\r
-  PRINT "#";\r
-NEXT i\r
-PRINT\r
-\r
-FOR y = 1 TO vs - 2     ' make main box area\r
-  PRINT "#";\r
-  FOR i = 1 TO hs - 2\r
-    PRINT ".";\r
-  NEXT i\r
-  PRINT "#"\r
-NEXT y\r
-\r
-FOR i = 1 TO hs         ' make last line of the box\r
-  PRINT "#";\r
-NEXT i\r
-PRINT\r
-\r
diff --git a/QBasic tutorial/group2/06.bas b/QBasic tutorial/group2/06.bas
deleted file mode 100755 (executable)
index d7f192d..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-' several commans may be at the single line, when separated by colon.\r
-\r
-1 a = a + 1: PRINT a; "x 7 ="; a * 7: IF a < 10 THEN GOTO 1\r
-\r
-\r
diff --git a/QBasic tutorial/group2/07.bas b/QBasic tutorial/group2/07.bas
deleted file mode 100755 (executable)
index 4a56ab1..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-INPUT "enter a number:", n\r
-\r
-IF n < 5 THEN PRINT "this number is smaller than 5"\r
-IF n > 5 THEN PRINT "this number is greater than 5"\r
-IF n = 5 THEN PRINT "this number is equal to 5"\r
-IF n <= 5 THEN PRINT "this number is 5, or less"\r
-IF n >= 5 THEN PRINT "this number is 5, or greater"\r
-IF n <> 5 THEN PRINT "this number is not 5"\r
-\r
-\r
diff --git a/QBasic tutorial/group2/08.bas b/QBasic tutorial/group2/08.bas
deleted file mode 100755 (executable)
index 7ec2867..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-CLS\r
-\r
-1\r
-PRINT "enter password:";\r
-COLOR 0                 ' set temprorarily text color to 0, to hide password\r
-                        ' black (0) text is invisivle on black backround.\r
-INPUT "", a$\r
-COLOR 7                 ' restore to original text color\r
-\r
-IF a$ <> "jerry" THEN PRINT "wrong password!": GOTO 1\r
-\r
-\r
-CLS\r
-LOCATE 1, 1\r
-COLOR 14\r
-PRINT "          ========================================"\r
-PRINT "          Welcome to nuclear rocket control system"\r
-PRINT "          ========================================"\r
-COLOR 10, 1\r
-PRINT "..............................................................."\r
-PRINT ".....MMMMMM................MM...MMMMMMM.MMMMMM.MMM..MMMMMMM..MM"\r
-PRINT "MMMMMMMMMMMMMMM...MM.M....MMMMM.MM.MMMMMMMMMMMMMMMMMMMMMMM.MM.."\r
-PRINT ".MMMMMMMMMMM.M.....MMM...MM.....MMMMMMMMMMMMMMMMMMMMMM.M......."\r
-PRINT "..MMMMMMMMMMMM..............MMMMMMMMMMMMMMMMMMMMMMMM..M ......."\r
-PRINT "....MMMMMMMM...............MMMM..MMMMM.MMMMMMMMMMMMM.MM........"\r
-PRINT ".....MMMMMMM.............MMMMMMMM..MMM..MMMMMM.MMMMM.M........."\r
-PRINT "........MM...............MMMMMMMMMM.M.....MM...........M......."\r
-PRINT "......MMMMMM................MMMMMMM....................M......."\r
-PRINT ".....MMMMMMMM.................MMMMMM....................MMM...."\r
-PRINT "......MMMMMMM.................MMMMM...................MMMMMM..."\r
-PRINT "........MMMMMM..................MM....................MMMMMMM.."\r
-PRINT "..........MMMMM ...........................................MM.."\r
-\r
-LOCATE 7, 34            ' display our location\r
-COLOR 12 + 16\r
-PRINT "*"\r
-\r
-FOR a = 9 TO 23         ' play tune\r
-  SOUND 1.5 ^ a, 3\r
-NEXT a\r
-\r
-COLOR 7, 0              ' restore default color\r
-\r
diff --git a/QBasic tutorial/group2/09.bas b/QBasic tutorial/group2/09.bas
deleted file mode 100755 (executable)
index c155bb9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-a$ = "software"\r
-\r
-PRINT a$\r
-PRINT LEFT$(a$, 4)              ' get left piece\r
-PRINT RIGHT$(a$, 4)             ' get right piece\r
-\r
diff --git a/QBasic tutorial/group2/10.bas b/QBasic tutorial/group2/10.bas
deleted file mode 100755 (executable)
index 0cf930b..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-CLS\r
-\r
-INPUT "Enter some text:", t$\r
-\r
-PRINT "You entered:" + t$\r
-PRINT "You entered:"; t$\r
-PRINT "You entered:", t$\r
-\r
-\r
-PRINT "It's length is"; LEN(t$); "letters."\r
-\r
-FOR i = 1 TO LEN(t$)    ' get text from left\r
-  PRINT LEFT$(t$, i)\r
-NEXT i\r
-\r
-PRINT\r
-                       \r
-FOR i = 1 TO LEN(t$)    ' get text from right\r
-  PRINT RIGHT$(t$, i)\r
-NEXT i\r
-\r
diff --git a/QBasic tutorial/group2/11.bas b/QBasic tutorial/group2/11.bas
deleted file mode 100755 (executable)
index 0831a84..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CLS\r
-\r
-INPUT "Enter some text:", t$\r
-\r
-FOR i = 1 TO LEN(t$)\r
-  a$ = LEFT$(t$, i)\r
-  b$ = RIGHT$(a$, 1)\r
-  PRINT "letter:"; b$\r
-NEXT i\r
-\r
diff --git a/QBasic tutorial/group2/12.bas b/QBasic tutorial/group2/12.bas
deleted file mode 100755 (executable)
index 9e6ca8c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-y = 10\r
-ys = 1\r
-\r
-1\r
-CLS\r
-y = y + ys\r
-IF y > 20 THEN ys = -1\r
-IF y < 2 THEN ys = 1\r
-LOCATE y\r
-PRINT "This is jumping text"\r
-SOUND y * 200 + 100, 1\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/13.bas b/QBasic tutorial/group2/13.bas
deleted file mode 100755 (executable)
index 38cf3c7..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-CLS\r
-\r
-x = 12          ' ball X coordinate\r
-y = 7           ' ball Y coordinate\r
-xs = 1          ' speed on X direction\r
-ys = 1          ' speed on Y direction\r
-\r
-1\r
-LOCATE y, x     ' erase ball\r
-PRINT " "\r
-\r
-x = x + xs      ' calculate new ball coordinates\r
-y = y + ys\r
-\r
-LOCATE y, x     ' draw ball\r
-PRINT "O"\r
-\r
-\r
-IF x > 79 THEN xs = -1: SOUND 1000, 1  ' check for boundaries\r
-IF x < 2 THEN xs = 1: SOUND 1000, 1\r
-\r
-IF y > 22 THEN ys = -1: SOUND 1000, 1\r
-IF y < 2 THEN ys = 1: SOUND 1000, 1\r
-\r
-SOUND 0, 1      ' wait\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/14.bas b/QBasic tutorial/group2/14.bas
deleted file mode 100755 (executable)
index 14f4695..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-CLS\r
-PRINT "press keys 0-9, for sound"\r
-PRINT "press ESC to exit program"\r
-\r
-1\r
-a$ = INPUT$(1)\r
-\r
-IF a$ = "1" THEN SOUND 1000, 2\r
-IF a$ = "2" THEN SOUND 1100, 2\r
-IF a$ = "3" THEN SOUND 1200, 2\r
-IF a$ = "4" THEN SOUND 1300, 2\r
-IF a$ = "5" THEN SOUND 1400, 2\r
-IF a$ = "6" THEN SOUND 1500, 2\r
-IF a$ = "7" THEN SOUND 1600, 2\r
-IF a$ = "8" THEN SOUND 1700, 2\r
-IF a$ = "9" THEN SOUND 1800, 2\r
-IF a$ = "0" THEN SOUND 1900, 2\r
-IF a$ = CHR$(27) THEN SYSTEM   ' 27 = ESCape key code\r
-\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/15.bas b/QBasic tutorial/group2/15.bas
deleted file mode 100755 (executable)
index f5121f6..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CLS\r
-\r
-FOR a = 32 TO 255\r
-PRINT " " + CHR$(a);\r
-NEXT a\r
-\r
-PRINT " "\r
-PRINT " "\r
-PRINT "Hi there! " + CHR$(1)\r
-\r
diff --git a/QBasic tutorial/group2/16.bas b/QBasic tutorial/group2/16.bas
deleted file mode 100755 (executable)
index 59bce8a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-CLS\r
-PRINT "Press any key..."\r
-\r
-1\r
-a$ = INPUT$(1)\r
-\r
-PRINT "pressed key was: ";\r
-\r
-IF ASC(a$) > 32 THEN PRINT a$\r
-\r
-IF a$ = CHR$(27) THEN PRINT "Escape"\r
-IF a$ = CHR$(13) THEN PRINT "Enter"\r
-IF a$ = CHR$(8) THEN PRINT "Backspace"\r
-IF a$ = CHR$(9) THEN PRINT "Tabulator"\r
-IF a$ = " " THEN PRINT "Space"\r
-\r
-PRINT "ASCII code is: "; ASC(a$)\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/17.bas b/QBasic tutorial/group2/17.bas
deleted file mode 100755 (executable)
index ee9a18c..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-CLS\r
-PRINT "Use keys 4, 8, 6, 2 for control, make sure the NumLock is on"\r
-PRINT "ESC to exit"\r
-PRINT " "\r
-PRINT "Press any key to continue..."\r
-a$ = INPUT$(1)\r
-\r
-COLOR 14\r
-x = 40\r
-y = 10\r
-1\r
-CLS\r
-LOCATE y, x\r
-PRINT CHR$(2)\r
-a$ = INPUT$(1)\r
-IF a$ = "4" THEN x = x - 1\r
-IF a$ = "6" THEN x = x + 1\r
-IF a$ = "8" THEN y = y - 1\r
-IF a$ = "2" THEN y = y + 1\r
-IF a$ = CHR$(27) THEN SYSTEM\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group2/18.bas b/QBasic tutorial/group2/18.bas
deleted file mode 100755 (executable)
index 391a349..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-CLS\r
-1\r
-\r
-PRINT "******** Select action: ********"\r
-PRINT " "\r
-PRINT "1 - exit program"\r
-PRINT "2 - make a sound"\r
-PRINT "3 - draw box"\r
-\r
-INPUT "", a\r
-\r
-IF a = 1 THEN SYSTEM\r
-\r
-IF a = 2 THEN SOUND 2000, 2\r
-\r
-IF a = 3 THEN\r
-  FOR c = 1 TO 15\r
-    FOR b = 1 TO 50\r
-      PRINT "#";\r
-    NEXT b\r
-    PRINT " "\r
-  NEXT c\r
-END IF\r
-\r
-IF a > 3 THEN PRINT "Number too large"\r
-IF a < 1 THEN PRINT "Number too small"\r
-GOTO 1\r
-\r
diff --git a/QBasic tutorial/group3/00.bas b/QBasic tutorial/group3/00.bas
deleted file mode 100755 (executable)
index 91414f8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-SCREEN 13    ' set video mode 320 x 200   256 colors\r
-\r
-PRINT "Hello..."\r
-\r
-PSET (160, 100), 10    ' draws a point\r
-                       ' x=160  y=100 color=10\r
-\r
diff --git a/QBasic tutorial/group3/01.bas b/QBasic tutorial/group3/01.bas
deleted file mode 100755 (executable)
index 938bc41..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-SCREEN 13\r
-\r
-FOR y = 50 TO 150\r
-  FOR x = 100 TO 200\r
-    PSET (x, y), 10\r
-  NEXT x\r
-  SOUND y, 1\r
-NEXT y\r
-\r
diff --git a/QBasic tutorial/group3/02.bas b/QBasic tutorial/group3/02.bas
deleted file mode 100755 (executable)
index 11df674..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-DECLARE SUB box (x1!, y1!, x2!, y2!, c!)\r
-\r
-' Press F2 to see submodules\r
-' Nazmi F2 xtob uvidet SUB moduli\r
-' Vajuta F2 et n\84ha SUB mooduleid\r
-\r
-\r
-SCREEN 13\r
-\r
-box 10, 10, 100, 100, 15\r
-\r
-box 30, 80, 300, 120, 11\r
-\r
-box 140, 20, 180, 180, 10\r
-\r
-SUB box (x1, y1, x2, y2, c)\r
-\r
-FOR y = y1 TO y2\r
-  FOR x = x1 TO x2\r
-    PSET (x, y), c\r
-  NEXT x\r
-NEXT y\r
-\r
-END SUB\r
-\r
diff --git a/QBasic tutorial/group3/03.bas b/QBasic tutorial/group3/03.bas
deleted file mode 100755 (executable)
index 8ddb8b2..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-SCREEN 13\r
-\r
-LINE (10, 10)-(200, 100), 14\r
-\r
-CIRCLE (100, 100), 80, 10\r
-\r
diff --git a/QBasic tutorial/group3/04.bas b/QBasic tutorial/group3/04.bas
deleted file mode 100755 (executable)
index a806541..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-SCREEN 13\r
-\r
-LINE (10, 10)-(50, 50), 14              ' line\r
-\r
-LINE (100, 10)-(150, 50), 14, B         ' box\r
-\r
-LINE (200, 10)-(250, 50), 14, BF        ' filled box\r
-\r
diff --git a/QBasic tutorial/group3/05.bas b/QBasic tutorial/group3/05.bas
deleted file mode 100755 (executable)
index 3e87408..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-SCREEN 13\r
-\r
-FOR x = 0 TO 255\r
-  LINE (x, 50)-(x, 100), x\r
-NEXT x\r
-\r
diff --git a/QBasic tutorial/group3/06.bas b/QBasic tutorial/group3/06.bas
deleted file mode 100755 (executable)
index 5bb13d3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-SCREEN 13\r
-\r
-\r
-CIRCLE (160, 100), 80, 15\r
-LINE (100, 10)-(200, 180), 15\r
-\r
-PRINT "press any key..."\r
-\r
-a$ = INPUT$(1)\r
-\r
-PAINT (180, 100), 15\r
-\r
diff --git a/QBasic tutorial/group3/07.bas b/QBasic tutorial/group3/07.bas
deleted file mode 100755 (executable)
index 3c7ba6c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-DECLARE SUB sihik (x!, y!)\r
-SCREEN 13\r
-\r
-' Press F2 to see submodules list\r
-' Vajuta F2 at n\84ha sub moodulite listi\r
-' nazmi F2 xtobe uvidjet sub spisok sub modulei\r
-\r
-\r
-sihik 100, 100\r
-sihik 200, 50\r
-sihik 180, 150\r
-\r
-SUB sihik (x, y)\r
-\r
-CIRCLE (x, y), 10, 15\r
-CIRCLE (x, y), 20, 15\r
-CIRCLE (x, y), 30, 15\r
-\r
-LINE (x, y - 50)-(x, y + 50), 15\r
-LINE (x - 50, y)-(x + 50, y), 15\r
-\r
-END SUB\r
-\r
diff --git a/QBasic tutorial/group3/08.bas b/QBasic tutorial/group3/08.bas
deleted file mode 100755 (executable)
index deff209..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-SCREEN 13\r
-\r
-\r
-FOR x = 0 TO 319\r
-\r
-  y = SIN(x / 10) * 50 + 100\r
-  PSET (x, y), 14\r
-\r
-  y = COS(x / 10) * 50 + 100\r
-  PSET (x, y), 12\r
-\r
-NEXT x\r
-\r
diff --git a/QBasic tutorial/group3/09.bas b/QBasic tutorial/group3/09.bas
deleted file mode 100755 (executable)
index eaea7f8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-SCREEN 13\r
-\r
-pi = 3.14\r
-mi = 7       ' amount of points on circular shape\r
-\r
-FOR a = 0 TO pi * 2 STEP pi * 2 / mi\r
-\r
-  x = SIN(a) * 50 + 100\r
-  y = COS(a) * 50 + 100\r
-  PSET (x, y), 10\r
-\r
-NEXT a\r
-\r
diff --git a/QBasic tutorial/group3/10.bas b/QBasic tutorial/group3/10.bas
deleted file mode 100755 (executable)
index fc4f497..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-SCREEN 13\r
-\r
-FOR i = 0 TO 320 STEP 10\r
-  LINE (0, i)-(319, i), 5\r
-  LINE (i, 0)-(i, 199), 5\r
-NEXT i\r
-\r
-LINE (0, 100)-(319, 100), 10\r
-\r
-PRINT "press a key..."\r
-a$ = INPUT$(1)\r
-\r
-y = 100\r
-ys = -1\r
-FOR t = 0 TO 300\r
-  PSET (t, y), 14\r
-  ys = ys + .01\r
-  y = y + ys\r
-  SOUND 300 - y, .1\r
-NEXT t\r
-\r
diff --git a/QBasic tutorial/group3/11.bas b/QBasic tutorial/group3/11.bas
deleted file mode 100755 (executable)
index c4e4c5a..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-CLS\r
-\r
-a = -12.7\r
-\r
-PRINT "normal: ", a\r
-PRINT "rounded: ", INT(a)\r
-PRINT "absolute: ", ABS(a)\r
-\r
-PRINT "reminder of 10 / 4 is: ", 10 MOD 4\r
-\r
index b5c34e9..8383361 100644 (file)
--- a/index.org
+++ b/index.org
@@ -147,6 +147,14 @@ appear small. To make it bigger:
 3. Save the changes and restart DOSBox for the configuration to take
    effect.
 
+*** Exit mouse capture
+
+DOSBox detects when a game uses mouse control. When you click on the
+screen, it should get locked (confined to the DOSBox window) and work.
+
+To release mouse lock, press:
+: CTRL-F10
+
 * Applications
 
 There are lot of applications. Few examples: