#qbasic

2025-07-06

Those of you who like and continue to use #BASIC, what do you like? What do you miss when you're coding in something else? Yes, embedded BASIC dialects count.

Do you think BASIC still has life left in it?

#programming #FreeBASIC #qbasic #vb #vba

Elod 🏳️‍🌈epc@infosec.exchange
2025-06-19

Fun fact - it started out as an #msdos game written in #qbasic and it looked like this.

#MSDOSgames

Squares in a grid, each split into 4 multicolored triangles. The game's name, Octopus, in pixelated characters with an image of an octopus above. Text buttons "Quit" and "Ready" next to the grid.
ℒӱḏɩę :blahaj:Lydie@tech.lgbt
2025-06-16

Me to local-run exaone3.5:32b "write a #QuickBasic program to animate a white square moving from left to right repeatedly"

Most #coding #AIs fuck up #QBASIC code pretty bad. This one did better than most I've tried. On the Left is what it spat out, and on the Right is how I fixed it.

Some shit code nonetheless.

DECLARE SUB DrawSquare (x AS INTEGER, y AS INTEGER, size AS INTEGER)
DECLARE SUB ClearScreen ()
DECLARE SUB Delay (milliseconds AS INTEGER)

SCREEN 12  ' Set the screen mode to a graphics mode (12 is a good choice for simplicity)

DIM SHARED squareSize AS INTEGER
squareSize = 20  ' Size of the square
DIM SHARED xPos AS INTEGER
xPos = 0        ' Initial x position of the square

MAIN:
    DO
        ClearScreen  ' Clear the screen
        DrawSquare xPos, (160 - INT(squareSize / 2)), squareSize  ' Draw square centered vertically
        Delay 50     ' Small delay to control speed
        xPos = xPos + 1  ' Move the square to the right
        IF xPos > (320 - squareSize) THEN  ' Reset position when it goes off-screen
            xPos = -squareSize
        END IF
    LOOP

SUB DrawSquare (x AS INTEGER, y AS INTEGER, size AS INTEGER)
    ' Draw a white square using line commands with integer coordinates
    LINE (x, y)-(x + size, y), 15  ' Bottom line
    LINE (x + size, y)-(x + size, y + size), 15 ' Right line
    LINE (x + size, y + size)-(x, y + size), 15 ' Top line
    LINE (x, y + size)-(x, y), 15  ' Left line
END SUB

SUB ClearScreen ()
    CLS  ' Clears the screen
END SUB

SUB Delay (milliseconds AS INTEGER)
    DO COUNT = 1 TO milliseconds * 5 WHILE INKEY$ <> CHR$(27) LOOP ' Loop until key press or delay completes
END SUBDECLARE SUB DrawSquare (x AS INTEGER, y AS INTEGER, size AS INTEGER)
DECLARE SUB ClearScreen ()
DECLARE SUB Delay (milliseconds AS INTEGER)

Screen 12 ' Set the screen mode to a graphics mode (12 is a good choice for simplicity)

Dim Shared squareSize As Integer
squareSize = 20 ' Size of the square
Dim Shared xPos As Integer
xPos = 0 ' Initial x position of the square

MAIN:
Do
    ClearScreen ' Clear the screen
    DrawSquare xPos, (160 - squareSize \ 2), squareSize ' Draw square centered vertically
    _Limit 144 'Slow 'er down a bit
    xPos = xPos + 1 ' Move the square to the right
    If xPos > (320 - squareSize) Then ' Reset position when it goes off-screen
        xPos = -squareSize
    End If
Loop

Sub DrawSquare (x As Integer, y As Integer, size As Integer)
    ' Draw a white square using line commands
    Line (x, y)-(x + size, y), 15 ' Bottom line
    Line (x + size, y)-(x + size, y + size), 15 ' Right line
    Line (x + size, y + size)-(x, y + size), 15 ' Top line
    Line (x, y + size)-(x, y), 15 ' Left line
End Sub

Sub ClearScreen ()
    Cls ' Clears the screen
End SubThe image shows a minimalist, dark-themed window titled "Untitled." The window has a purple title bar at the top, which includes the title on the left and standard window control buttons (minimize, maximize/restore, close) on the right. The main content area of the window is entirely black.

Near the top-left corner of the black content area, there is a small, outlined white square. This square is the only distinct element within the black space, giving the impression of a very basic or early-stage graphical application, or perhaps a terminal window that has just opened and is awaiting input.

Code Golf with C64 BASIC: Chessboard Challenge

lemmy.dbzer0.com/post/45951384

2025-05-14

using qb64 phoenix as of late, for image processing that i hate, get a lot of furor, from a syntax error, and notice the compiler is at three-point-eight

2025-05-13

now i have a basic compiler exquisite, load a program messy or is it? what happened to my code, wasn't supposed to overload, because i'm supposed to use "option explicit".

DO8PGG ☑️do8pgg@ruhr.social
2025-04-29
2025-03-16

When I was 11 years old, I was about 2 years into my journey as a , but had been limited to , outside of the occasional dabbling with at school. I wanted to do more, but C was a bit too advanced for me. That christmas, my surprised me with a boxed copy of Visual Basic 5.0 Enterprise edition. At the time, it was like $500. One of the greatest presents I have ever been given, I had no idea VB existed or that it was exactly what I wanted.

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst