From 11fbdbe28fb484677abe5269cba4ed940fac33b1 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Thu, 31 Jul 2025 15:46:02 +0300 Subject: [PATCH] Describe more communication programs. --- 2D GFX/Fractals/index.html | 40 ++--- 2D GFX/Spirals/index.html | 54 +++--- 2D GFX/Textures/index.html | 34 ++-- 3D GFX/3D Synthezier/doc/index.html | 162 +++++++++--------- 3D GFX/Miscellaneous/index.html | 54 +++--- 3D GFX/Space/index.html | 36 ++-- Math/Plotting/index.html | 36 ++-- Math/Simulation/index.html | 64 +++---- Math/Truth table/index.html | 64 +++---- Miscellaneous/Mouse driver/index.html | 30 ++-- Networking/COM port terminal.bas | 12 +- .../Digital data over analog audio/index.html | 24 +-- Networking/LPT morse.bas | 132 -------------- Networking/Morse.bas | 1 + index.org | 68 +++++++- 15 files changed, 374 insertions(+), 437 deletions(-) delete mode 100755 Networking/LPT morse.bas diff --git a/2D GFX/Fractals/index.html b/2D GFX/Fractals/index.html index 9002ff2..1021fda 100644 --- a/2D GFX/Fractals/index.html +++ b/2D GFX/Fractals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Fractals @@ -210,11 +210,11 @@

Table of Contents

@@ -236,8 +236,8 @@ -
-

1. Fractal circles

+
+

1. Fractal circles

This QBasic program generates a visually captivating spiral fractal @@ -247,7 +247,7 @@ geometry, recursive programming, and graphical design.

-
+

fractal%20circles.png

@@ -266,8 +266,8 @@ indefinitely.
-
-

2. Fractal circles animated

+
+

2. Fractal circles animated

This QBasic program creates an animated fractal composed of circles, @@ -287,29 +287,29 @@ system to control the animation's progression.

-
-

3. Fractal of squares

+
+

3. Fractal of squares

This QBasic program generates and displays a fractal pattern composed of squares.

-
+

fractal%20squares,%201.png

-
+

fractal%20squares,%202.png

-
-

4. Fractal of squares animated

+
+

4. Fractal of squares animated

This QBasic program generates an animated fractal pattern composed of @@ -331,8 +331,8 @@ resulting in a dynamic and ever-changing geometric pattern.

-
-

5. Fractal of trees

+
+

5. Fractal of trees

QBasic program that generates a visually appealing fractal tree @@ -355,7 +355,7 @@ resembles a tree, with branches that grow and change over time.

-

Created: 2025-07-30 ke 12:27

+

Created: 2025-07-31 to 03:14

Validate

diff --git a/2D GFX/Spirals/index.html b/2D GFX/Spirals/index.html index 191b6f8..9292d99 100644 --- a/2D GFX/Spirals/index.html +++ b/2D GFX/Spirals/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Spiral series @@ -210,12 +210,12 @@

Table of Contents

@@ -236,11 +236,11 @@ } -
-

1. Spiral with increasing density

+
+

1. Spiral with increasing density

-
+

spiral.png

@@ -320,11 +320,11 @@ userInput$ = INPUT$(1)
-
-

2. Spiral with varying height

+
+

2. Spiral with varying height

-
+

spiral, 2.png

@@ -391,11 +391,11 @@ a$ = INPUT$(1)
-
-

3. Shaded spiral

+
+

3. Shaded spiral

-
+

spiral, 3.png

@@ -497,8 +497,8 @@ a$ = INPUT$(1)
-
-

4. Sphere forming spiral

+
+

4. Sphere forming spiral

Similar to previous spiral, Line segments are connected between the @@ -507,7 +507,7 @@ multiple linked spherical shapes. Initially point cloud in shown:

-
+

spiral, 4, 1.png

@@ -517,7 +517,7 @@ In the next step, points are connected using lines:

-
+

spiral, 4, 2.png

@@ -622,11 +622,11 @@ a$ = INPUT$(1)
-
-

5. Textured spherical spiral

+
+

5. Textured spherical spiral

-
+

spiral, 5.png

@@ -749,11 +749,11 @@ a$ = INPUT$(1)
-
-

6. Textured and shaded spherical spiral

+
+

6. Textured and shaded spherical spiral

-
+

spiral, 6.png

@@ -937,7 +937,7 @@ yStep2 = (oppositePointY2 - oppositePointY1) / stepCount
-

Created: 2025-07-30 ke 12:27

+

Created: 2025-07-31 to 03:14

Validate

diff --git a/2D GFX/Textures/index.html b/2D GFX/Textures/index.html index 850d28f..8ff399e 100644 --- a/2D GFX/Textures/index.html +++ b/2D GFX/Textures/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Algorithmic textures @@ -210,11 +210,11 @@

Table of Contents

@@ -233,8 +233,8 @@ } -
-

1. Circular waves

+
+

1. Circular waves

This QBasic program creates visually captivating circular wave @@ -313,8 +313,8 @@ algorithms can produce intricate and visually appealing results.

-
-

2. Diamond square clouds

+
+

2. Diamond square clouds

This QBasic program demonstrates the Diamond-Square algorithm, a @@ -429,8 +429,8 @@ WAITa$ = INPUT$(1)

-
-

3. Old paper

+
+

3. Old paper

This QBasic program generates a procedural texture that simulates the @@ -527,8 +527,8 @@ inputKey$ = INPUT$(1)

-
-

4. Wood

+
+

4. Wood

This QBasic program creates a visually appealing simulation of a wood @@ -622,8 +622,8 @@ exitKey$ = INPUT$(1)

-
-

5. Yellow flame

+
+

5. Yellow flame

"Yellow Flame" is a visually captivating program written in QBasic @@ -702,7 +702,7 @@ userInput$ = INPUT$(1)

-

Created: 2025-07-30 ke 12:27

+

Created: 2025-07-31 to 03:14

Validate

diff --git a/3D GFX/3D Synthezier/doc/index.html b/3D GFX/3D Synthezier/doc/index.html index 2042d46..4c35d3c 100644 --- a/3D GFX/3D Synthezier/doc/index.html +++ b/3D GFX/3D Synthezier/doc/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + 3D Synthezier @@ -1103,39 +1103,39 @@ hsAddReviewPanels();

Table of Contents

@@ -1157,8 +1157,8 @@ hsAddReviewPanels(); -
-

1. Operating principle

+
+

1. Operating principle

Parses scene definition language and creates 3D world based on @@ -1221,60 +1221,60 @@ They were produced by importing generated -

1.1. Rectangular city

+
+

1.1. Rectangular city

-
+

rectangular city, 1.jpeg

-
+

rectangular city, 2.jpeg

-
+

rectangular city, 3.jpeg

-
-

1.2. Hexagonal city

+
+

1.2. Hexagonal city

-
+

hexagonal city, 1.jpeg

-
+

hexagonal city, 2.jpeg

-
+

hexagonal city, 3.jpeg

-
-

2. Scene description language

+
+

2. Scene description language

See also examples.

-
-

2.1. here

+
+

2.1. here

 here
@@ -1285,8 +1285,8 @@ defines new segment
 

-
-

2.2. p

+
+

2.2. p

 p  x y z
@@ -1297,8 +1297,8 @@ defines new point
 

-
-

2.3. f

+
+

2.3. f

 f  p1 p2 p3 p4
@@ -1309,8 +1309,8 @@ defines new polygon,  p4  may be unused
 

-
-

2.4. warn

+
+

2.4. warn

 warn  <message>
@@ -1321,8 +1321,8 @@ displays warning message, and wait for key
 

-
-

2.5. end

+
+

2.5. end

 end
@@ -1333,8 +1333,8 @@ terminates parser
 

-
-

2.6. mtl

+
+

2.6. mtl

 mtl  material
@@ -1345,8 +1345,8 @@ selects material
 

-
-

2.7. mtlrnd

+
+

2.7. mtlrnd

 mtlrnd  material ...
@@ -1357,8 +1357,8 @@ selects random material from list
 

-
-

2.8. obj

+
+

2.8. obj

 obj  object xz45 xy20 x+3 y*2
@@ -1373,14 +1373,14 @@ directly from file, and not chached, to allow loading of greater than
 

-
+

rotation.png

-
-

2.9. rnd

+
+

2.9. rnd

 rnd  p^1^2^3 p^7^2^1
@@ -1391,8 +1391,8 @@ select random command to execute, ^ will be converted to spaces.
 

-
-

2.10. #

+
+

2.10. #

 # whatever text
@@ -1403,8 +1403,8 @@ comment
 

-
-

2.11. out

+
+

2.11. out

 out  file
@@ -1415,8 +1415,8 @@ specify output file name, must be first command
 

-
-

2.12. set

+
+

2.12. set

 set  variable  contents
@@ -1428,8 +1428,8 @@ string. max variables is 100. first is 0.
 

-
-

2.13. variables usage

+
+

2.13. variables usage

 anycommand %1 anything
@@ -1440,8 +1440,8 @@ inserts variable 1 contents info line
 

-
-

2.14. cmp

+
+

2.14. cmp

 cmp  flag string1 string2
@@ -1452,8 +1452,8 @@ compares strings, and inserts TRUE to flag, if they are equal, else inserts FALS
 

-
-

2.15. ?

+
+

2.15. ?

 ?flag anycommand
@@ -1468,8 +1468,8 @@ exapmle: ?3 obj car z*2 xy45
 

-
-

2.16. dum

+
+

2.16. dum

 dum
@@ -1482,16 +1482,16 @@ dummy function, does notheing
 
-
-

3. Installation

+
+

3. Installation

Edit bin/3dparse.bas file and update include path in there.

-
-

3.1. System requirements

+
+

3.1. System requirements

@@ -1522,8 +1522,8 @@ Edit bin/3dparse.bas file and update include path in there. -
-

3.2. Directory layout

+
+

3.2. Directory layout

bin
@@ -1540,8 +1540,8 @@ Edit bin/3dparse.bas file and update include path in there.
-
-

4. Usage

+
+

4. Usage

Make sure you have QB binaries in your PATH. Execute @@ -1566,7 +1566,7 @@ Visualize scene with your favourite renderer.

-

Created: 2025-07-30 ke 12:28

+

Created: 2025-07-31 to 03:15

Validate

diff --git a/3D GFX/Miscellaneous/index.html b/3D GFX/Miscellaneous/index.html index 5f4e084..92965a5 100644 --- a/3D GFX/Miscellaneous/index.html +++ b/3D GFX/Miscellaneous/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Miscellaneous 3D graphics demos @@ -210,14 +210,14 @@

Table of Contents

@@ -238,8 +238,8 @@ } -
-

1. Rotating exclamation mark

+
+

1. Rotating exclamation mark

Wireframe 3D model of a rotating exclamation mark. @@ -258,8 +258,8 @@ Wireframe 3D model of a rotating exclamation mark.

-
-

2. 3D bouncing ball

+
+

2. 3D bouncing ball

This QBasic program creates a visually engaging 3D animation of a @@ -280,8 +280,8 @@ of early computer graphics techniques.

-
-

3. 3D text in a room

+
+

3. 3D text in a room

Wireframe 3D text hanging in a wireframe 3D room. User can look and @@ -301,8 +301,8 @@ fly around in all directions.

-
-

4. 3D bouncing cubes on grid floor

+
+

4. 3D bouncing cubes on grid floor

3D wireframe cubes bouncing on a grid floor, creating an immersive and @@ -322,8 +322,8 @@ dynamic visual effect.

-
-

5. Matrix math for rotation in 3D space

+
+

5. Matrix math for rotation in 3D space

Instead of combining simple 2D rotors, pixels in this 3D space are @@ -343,8 +343,8 @@ rotated by using matrix multiplications.

-
-

6. Maze explorer

+
+

6. Maze explorer

The Evolving 3D Maze Explorer is a QBasic program that generates and @@ -355,7 +355,7 @@ changes as they navigate through it.

-
+

Maze%20explorer.png

@@ -366,8 +366,8 @@ changes as they navigate through it.
-
-

7. Tank animation

+
+

7. Tank animation

Animated tank driving through the bridge back and forward. User can @@ -387,8 +387,8 @@ look and fly around in all directions.

-
-

8. Tiled room

+
+

8. Tiled room

Room with some tiles on the wall and on the floor. User can freely fly @@ -409,7 +409,7 @@ around.

-

Created: 2025-07-30 ke 12:29

+

Created: 2025-07-31 to 03:15

Validate

diff --git a/3D GFX/Space/index.html b/3D GFX/Space/index.html index e3257ab..ad77b42 100644 --- a/3D GFX/Space/index.html +++ b/3D GFX/Space/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Space themed 3D graphics @@ -210,10 +210,10 @@

Table of Contents

@@ -234,8 +234,8 @@ } -
-

1. Galaxy explorer

+
+

1. Galaxy explorer

This QBasic program renders a navigable 3D point cloud galaxy, @@ -245,7 +245,7 @@ galaxy with stars distributed in a spiral pattern.

-
+

Galaxy%20explorer.png

@@ -256,8 +256,8 @@ galaxy with stars distributed in a spiral pattern.
-
-

2. Rocket simulator

+
+

2. Rocket simulator

QBasic program that simulates the takeoff and flight of a rocket from @@ -279,8 +279,8 @@ observe the rocket's trajectory from various angles.

-
-

3. Stars

+
+

3. Stars

The 3D Starfield Simulation is a QBasic program that creates a @@ -320,8 +320,8 @@ based on its distance, with closer stars appearing brighter.

-
-

4. Universe explorer

+
+

4. Universe explorer

This QBasic program that simulates a navigable 3D universe. Users can @@ -358,19 +358,19 @@ limiting the number of rendered objects based on distance. -

+

1.png

-
+

2.png

-
+

3.png

@@ -382,7 +382,7 @@ limiting the number of rendered objects based on distance.
-

Created: 2025-07-30 ke 12:29

+

Created: 2025-07-31 to 03:16

Validate

diff --git a/Math/Plotting/index.html b/Math/Plotting/index.html index 29cc33d..68a413d 100644 --- a/Math/Plotting/index.html +++ b/Math/Plotting/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Plotting @@ -210,10 +210,10 @@

Table of Contents

@@ -234,8 +234,8 @@ } -
-

1. 2D graph

+
+

1. 2D graph

The 2D Graph Plotter is a simple yet effective program written in @@ -251,7 +251,7 @@ based on a user-defined mathematical function.

-
+

2D%20graph%20plot.png

@@ -262,8 +262,8 @@ based on a user-defined mathematical function.
-
-

2. 3D graph

+
+

2. 3D graph

The 3D Heightmap Explorer is a QBasic program designed to visualize @@ -299,7 +299,7 @@ grid.

-
+

3D%20graph.png

@@ -310,8 +310,8 @@ grid.
-
-

3. Deriviative calculator

+
+

3. Deriviative calculator

This QBasic program is designed to compute and plot an arbitrary @@ -324,7 +324,7 @@ visualized.

-
+

Deriviative%20calculator.png

@@ -335,8 +335,8 @@ visualized.
-
-

4. Sine and cosine table

+
+

4. Sine and cosine table

The SIN & COS Table Generator is a QBasic program designed to visually @@ -346,7 +346,7 @@ visual representation of these fundamental trigonometric functions.

-
+

Sine%20and%20cosine%20table.png

@@ -358,7 +358,7 @@ visual representation of these fundamental trigonometric functions.
-

Created: 2025-07-30 ke 12:29

+

Created: 2025-07-31 to 03:16

Validate

diff --git a/Math/Simulation/index.html b/Math/Simulation/index.html index ead8f08..753b6c5 100644 --- a/Math/Simulation/index.html +++ b/Math/Simulation/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Simulation @@ -210,14 +210,14 @@

Table of Contents

@@ -238,8 +238,8 @@ } -
-

1. Explosion simulator

+
+

1. Explosion simulator

This QBasic program simulates the propagation of shock waves in a gas @@ -265,7 +265,7 @@ conditions by setting velocities to zero at wall boundaries.

-
+

Explosion%20simulator.png

@@ -276,8 +276,8 @@ conditions by setting velocities to zero at wall boundaries.
-
-

2. Gravity in 2D

+
+

2. Gravity in 2D

The Gravitation Simulation program is a simple yet insightful QBasic @@ -289,7 +289,7 @@ educational tool for understanding basic orbital mechanics.

-
+

Gravity%20in%202D.png

@@ -300,8 +300,8 @@ educational tool for understanding basic orbital mechanics.
-
-

3. Gravity in 3D

+
+

3. Gravity in 3D

This QBasic program simulates the gravitational interactions between @@ -335,8 +335,8 @@ will reach stable configuration.

-
-

4. Interference

+
+

4. Interference

This QBasic program simulates the interference pattern created by two @@ -364,8 +364,8 @@ displayed as a third waveform.

-
-

5. Interferogram

+
+

5. Interferogram

This QBasic program simulates the interference pattern created by @@ -375,7 +375,7 @@ used in physics and engineering to analyze wave interactions.

-
+

Interferogram.png

@@ -386,8 +386,8 @@ used in physics and engineering to analyze wave interactions.
-
-

6. Surface tension

+
+

6. Surface tension

This QBasic program simulates the behavior of water spills and the @@ -411,7 +411,7 @@ water cell if surrounded by a high density of water cells.

-
+

Surface%20tension.png

@@ -422,8 +422,8 @@ water cell if surrounded by a high density of water cells.
-
-

7. Wave 1

+
+

7. Wave 1

This QBasic program simulates the propagation of waves across a @@ -439,7 +439,7 @@ loss.

-
+

Wave%201.png

@@ -450,8 +450,8 @@ loss.
-
-

8. Wave 2

+
+

8. Wave 2

This QBasic program simulates and visualizes the behavior of water @@ -463,7 +463,7 @@ understanding wave mechanics.

-
+

Wave%202.png

@@ -475,7 +475,7 @@ understanding wave mechanics.
-

Created: 2025-07-30 ke 12:29

+

Created: 2025-07-31 to 03:16

Validate

diff --git a/Math/Truth table/index.html b/Math/Truth table/index.html index 44eb04e..0dc8b26 100644 --- a/Math/Truth table/index.html +++ b/Math/Truth table/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Truth table calculator @@ -1103,20 +1103,20 @@ hsAddReviewPanels();

Table of Contents

@@ -1133,12 +1133,12 @@ the input variables, with the corresponding output value. Truth tables are cruci designing and understanding digital circuits, Boolean algebra, and logical expressions.

-
-

1. Implemented logical operations

+
+

1. Implemented logical operations

-
-

1.1. Equivalent ( ⇔ , 1 )

+
+

1.1. Equivalent ( ⇔ , 1 )

The equivalent operation, also known as logical biconditional, is true if and only if @@ -1196,8 +1196,8 @@ Truth Table:

-
-

1.2. Implies ( ⇒ , 2 )

+
+

1.2. Implies ( ⇒ , 2 )

An implication asserts that if the first proposition is true, the @@ -1255,8 +1255,8 @@ Truth table:

-
-

1.3. OR ( ∨ , 3 )

+
+

1.3. OR ( ∨ , 3 )

The OR operation, also known as logical disjunction, is true if at @@ -1314,8 +1314,8 @@ Truth table:

-
-

1.4. AND ( ∧ , 4 )

+
+

1.4. AND ( ∧ , 4 )

The AND operation, also known as logical conjunction, is true if and @@ -1372,8 +1372,8 @@ Truth table:

-
-

1.5. NOT ( ¬ , 5 )

+
+

1.5. NOT ( ¬ , 5 )

The NOT operation, also known as logical negation, inverts the value @@ -1414,12 +1414,12 @@ Truth Table:

-
-

2. Examples

+
+

2. Examples

-
-

2.1. Example: (A ∧ B) ∨ ¬C

+
+

2.1. Example: (A ∧ B) ∨ ¬C

@@ -1502,8 +1502,8 @@ Truth Table: -
-

2.2. Example: A ⇒ (B ∨ ¬C)

+
+

2.2. Example: A ⇒ (B ∨ ¬C)

@@ -1586,8 +1586,8 @@ Truth Table: -
-

2.3. Example: (A ⇔ B) ∧ C

+
+

2.3. Example: (A ⇔ B) ∧ C

Truth Table: @@ -1676,7 +1676,7 @@ Truth Table:

-

Created: 2025-07-30 ke 12:30

+

Created: 2025-07-31 to 03:17

Validate

diff --git a/Miscellaneous/Mouse driver/index.html b/Miscellaneous/Mouse driver/index.html index 1beacac..93ef481 100644 --- a/Miscellaneous/Mouse driver/index.html +++ b/Miscellaneous/Mouse driver/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Mouse driver for QBasic programs @@ -210,16 +210,16 @@

Table of Contents

-
-

1. Overview

+
+

1. Overview

QBasic, a popular programming language in the DOS era, lacks native @@ -230,8 +230,8 @@ workaround that allows QBasic to use mouse input.

-
-

2. High-level idea

+
+

2. High-level idea

Workaround to access mouse involves a Terminate and Stay Resident @@ -264,8 +264,8 @@ TSR keeps updating it with latest mouse state simultaneously.

-
-

3. Terminate and Stay Resident module

+
+

3. Terminate and Stay Resident module

A DOS TSR program that hooks into the system's interrupt mechanism to @@ -351,8 +351,8 @@ meanwhile.

-
-

4. QBasic demonstration program

+
+

4. QBasic demonstration program

A QBasic program that reads mouse data from the memory location @@ -362,7 +362,7 @@ clicks. -

diff --git a/Networking/COM port terminal.bas b/Networking/COM port terminal.bas index f60bb6e..cabd922 100755 --- a/Networking/COM port terminal.bas +++ b/Networking/COM port terminal.bas @@ -1,8 +1,12 @@ ' Simple COM port terminal -' made by Svjatoslav Agejenko -' in 2003.12 -' H-Page: svjatoslav.eu -' E-Mail: svjatoslav@svjatoslav.eu +' +' This program is free software: released under Creative Commons Zero (CC0) license +' by Svjatoslav Agejenko. +' Email: svjatoslav@svjatoslav.eu +' Homepage: http://www.svjatoslav.eu +' +' Changelog: +' 2003.12, Initial version CLS diff --git a/Networking/Digital data over analog audio/index.html b/Networking/Digital data over analog audio/index.html index 337dacc..8ba8eab 100644 --- a/Networking/Digital data over analog audio/index.html +++ b/Networking/Digital data over analog audio/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Data over analog audio @@ -210,15 +210,15 @@

Table of Contents

-
-

1. msg2xi: Text to Sound Encoder

+
+

1. msg2xi: Text to Sound Encoder

msg2xi is a utility designed to encode arbitrary text messages into an @@ -245,8 +245,8 @@ Download source code: Source code

-
-

2. xi2msg: Sound to Text Decoder

+
+

2. xi2msg: Sound to Text Decoder

The xi2msg utility is designed to decode digital information from an @@ -287,7 +287,7 @@ transmitted over telephone lines.

-
+

screenshot.png

@@ -299,8 +299,8 @@ Download source code: Source code
-
-

3. aver

+
+

3. aver

The aver.bas utility is designed to reduce noise in digitized audio @@ -343,7 +343,7 @@ Download source code: Source code

-

Created: 2025-07-31 to 03:01

+

Created: 2025-07-31 to 03:18

Validate

diff --git a/Networking/LPT morse.bas b/Networking/LPT morse.bas deleted file mode 100755 index 7527ae6..0000000 --- a/Networking/LPT morse.bas +++ /dev/null @@ -1,132 +0,0 @@ -' Svjatoslav Agejenko -' 2003.02, initial version -' 2024, fixing code readability - -' Program to control radio transmitter over LPT port, -' and send data in morse like code. - -DECLARE SUB sbit (a!) -DECLARE SUB msg (a$) -DECLARE SUB sb (a!) -DECLARE SUB quit () -DECLARE SUB tone (c!) -DECLARE SUB wai (a!) -DECLARE SUB echo () -DECLARE SUB lptsend () -DIM SHARED bit(0 TO 7) -DIM SHARED port - -CLS -port = &H378 -echo - -l = 0 -1 -IF timeStr$ <> TIME$ THEN - IF l > 60 THEN - echo - l = 0 - END IF - l = l + 1 - timeStr$ = TIME$ -END IF - -key$ = INKEY$ -IF key$ <> "" THEN quit -GOTO 1 - -SUB echo - -bit(5) = 1 -lptsend -wai 5 - -msg "Hello!" -' msg "Hello, world!" - -wai 1 -bit(5) = 0 -lptsend - -END SUB - -SUB lptsend - -b = 0 -FOR a = 0 TO 7 - b = b * 2 - IF bit(a) > 0 THEN - b = b + 1 - END IF -NEXT a - -OUT port, b - -END SUB - -SUB msg (message$) - -FOR a = 1 TO LEN(message$) - char$ = RIGHT$(LEFT$(message$, a), 1) - sb ASC(char$) - key$ = INKEY$ - IF key$ <> "" THEN quit -NEXT a - -END SUB - -SUB quit -bit(5) = 0 -lptsend -END -END SUB - -SUB sb (asciiVal) -d = asciiVal -c = 128 - -FOR b = 0 TO 7 - IF d >= c THEN - sbit 1 - d = d - c - ELSE - sbit 0 - END IF - c = c / 2 -NEXT b - -END SUB - -SUB sbit (value) -IF value = 1 THEN - tone 0 - tone 0 - tone 1 -ELSE - tone 0 - tone 1 - tone 1 -END IF -END SUB - -SUB tone (cValue) -' cValue = 1 -PRINT cValue; -FOR a = 1 TO 40 - bit(4) = cValue - lptsend - FOR b = 1 TO 500 - NEXT b - bit(4) = 0 - lptsend - FOR b = 1 TO 500 - NEXT b -NEXT a -END SUB - -SUB wai (aValue) -FOR b = 1 TO aValue * 10 - SOUND 0, .1 -NEXT b - -END SUB \ No newline at end of file diff --git a/Networking/Morse.bas b/Networking/Morse.bas index 7d8f3b9..06126a1 100755 --- a/Networking/Morse.bas +++ b/Networking/Morse.bas @@ -1,4 +1,5 @@ ' Plays entered text in morse code audio beeps using PC-speaker. +' ' This program is free software: released under Creative Commons Zero (CC0) license ' by Svjatoslav Agejenko. ' Email: svjatoslav@svjatoslav.eu diff --git a/index.org b/index.org index f7eb122..57a94cd 100644 --- a/index.org +++ b/index.org @@ -794,6 +794,69 @@ The program uses bit manipulation to control individual pins. Download source code: [[file:Networking/LPT%20pin%20control.bas][LPT pin control.bas]] +** COM port text terminal + +[[https://en.wikipedia.org/wiki/Serial_port][The COM port, short for "Communication Port" was a serial port +interface]] found on older personal computers. It was primarily used for +serial communication, where data is transmitted one bit at a time over +a communication channel. + +The COM port facilitated bidirectional communication between the +computer and connected devices, such as modems, mice, and keyboards. + +Typically available as 9-pin (DE-9) connectors, COM ports adhered to +the RS-232 standard for serial communication. + +Mice, before the prevalence of USB, commonly connected to computers +via COM ports, transmitting movement and button-click data through +this serial interface. + +COM ports operated using a UART (Universal Asynchronous +Receiver/Transmitter), which managed the conversion of data between +parallel form (used by the computer) and serial form (used by the +communication line). + +This program is a simple text mode terminal for communicating through +a COM port. + +How it Works: +- The program continuously checks the COM port status. +- If data is available, it reads the data and prints it to the screen + along with its ASCII value. +- It captures keyboard input from the user and sends it out through + the COM port. +- This creates a bidirectional communication channel between the + user's keyboard and the COM port device, typical of terminal + emulation software. + +#+INCLUDE: "Networking/COM port terminal.bas" src basic-qb45 + +Download source code: [[file:Networking/COM%20port%20terminal.bas][COM port terminal.bas]] + +** Parallel port to COM port text terminal + +This QBasic program demonstrates a clever method of transmitting data +from a parallel (LPT) port to a serial (COM) port using a technique +known as bit-banging. + +How It Works: +- The program initializes the parallel port and waits for keyboard + input. +- Each character input from the keyboard is converted into its ASCII + value. +- The ASCII value is converted into an 8-bit binary array, with each + array element representing a bit of the character. +- Each bit is then sent to the parallel port by toggling the output + lines accordingly. The bits are transmitted sequentially, simulating + serial data transmission. +- A loop holds each bit value for a predefined duration, mimicking + clock cycles necessary for serial communication. +- The program exits when the Escape key is pressed. + +#+INCLUDE: "Networking/LPT to COM port data transfer.bas" src basic-qb45 + +Download source code: [[file:Networking/LPT%20to%20COM%20port%20data%20transfer.bas][LPT to COM port data transfer.bas]] + ** Data over analog audio CODEC Utilities to encode digital data to sound file and back. @@ -804,7 +867,6 @@ Utilities to encode digital data to sound file and back. [[file:Networking/Digital%20data%20over%20analog%20audio/index.html][Read more]] - ** Morse This QBasic program allows users to input text and hear it played back @@ -813,7 +875,9 @@ for anyone interested in learning Morse code. It reads Morse code patterns from an external file named [[file:Networking/Morse.txt][Morse.txt]]. Each line in the file represents a character and its -corresponding Morse code. +corresponding Morse code: + +#+INCLUDE: "Networking/Morse.txt" src txt For each character in the input text, the program looks up its Morse code pattern and plays it back using the PC speaker. Dots are -- 2.20.1