Recent posts

#21
General Discussion / The World Depends on 60-Year-O...
Last post by Charles Pegge - July 06, 2024, 01:33:37 AM
COBOL

Coding with Dee
30 jun 2024

#22
OxygenBasic Examples / Re: Asm Help hello basic
Last post by Frank Brübach - July 05, 2024, 08:57:27 PM
Yes thanks you Charles that Wouldn't be my Intention :)

I was more interested in correct running the asm Part

Thanks, frank
#23
OxygenBasic Examples / Re: Asm Help hello basic
Last post by Charles Pegge - July 05, 2024, 08:26:23 PM
Asm not worth the hassle.
How about this?

'' VZ 200 computer 1983 (VTech Laser 200), 8 bit-homecomputer von 1983
''
'10 PRINT "HELLO BASIC!"
'' RUN
'' HELLO BASIC

'' READY

'' 20 PRINT "THANK YOU, BASIC!"

'' RUN


'' OxygenBasic on x86 PC running MS Windows 11. 2024
'
10: uses console
20: print "HELLO BASIC!" cr
30: print "THANK YOU, BASIC!" cr
40: wait
#24
OxygenBasic Examples / Asm Help hello basic
Last post by Frank Brübach - July 05, 2024, 06:30:35 PM
Hello Charles...

Its possible to fix this little asm example ?

I have found an old book about programming at a Second Hand book Shop and there was a Listing about hello Basic and a Photo of an old vz 200 Computer of 1983 :-)

Thanks, Frank

My example so far for Translation

uses console

'' '-------------------------------------------------------------------- //
''
'' VZ 200 computer 1983 (VTech Laser 200), 8 bit-homecomputer von 1983
''
'' 10 PRINT "HELLO BASIC!"
'' RUN
'' HELLO BASIC

'' READY

'' 20 PRINT "THANK YOU, BASIC!"

'' RUN

'' END
'-------------------------------------------------------------------- //

print "ok"

DECLARE FUNCTION WriteConsole LIB "kernel32" ALIAS "WriteConsoleA" _
  (BYVAL hConsoleOutput AS LONG, BYVAL lpBuffer AS STRING, _
  BYVAL nNumberOfCharsToWrite AS LONG, lpNumberOfCharsWritten AS LONG, _
  BYVAL lpReserved AS LONG) AS LONG

DECLARE FUNCTION GetStdHandle LIB "kernel32" ALIAS "GetStdHandle" _
  (BYVAL nStdHandle AS LONG) AS LONG

%STD_OUTPUT_HANDLE = -11

  DIM hConsoleOutput AS LONG
  DIM lpNumberOfCharsWritten AS LONG
  lpNumberOfCharsWritten=30
  DIM msg1 AS STRING
  DIM msg2 AS STRING

  msg1 = "HELLO BASIC!" + CHR(0)
  msg2 = "THANK YOU, BASIC!" + CHR(0)

  hConsoleOutput = GetStdHandle(%STD_OUTPUT_HANDLE)

  ' Print "HELLO BASIC!" using inline Assembly
'  ASM
'    mov eax, msg1 'ERROR: integer constant expected
    mov ebx, hConsoleOutput
    mov ecx, msg1 '- 1
    lea edx, lpNumberOfCharsWritten 'ERROR invalid operation with a register variable
    push edx
    push 0
    push ecx
    push eax
    push ebx
    CALL WriteConsole
'  END ASM


print "ok1"

  ' Print "THANK YOU, BASIC!" using inline Assembly
'  ASM
    mov eax, msg2
    mov ebx, hConsoleOutput
    mov ecx, msg2 '' LEN(msg2) - 1
    lea edx, lpNumberOfCharsWritten
    push edx
    push 0
    push ecx
    push eax
    push ebx
    CALL WriteConsole
'  END ASM

print "ok2"
wait
#25
General Discussion / Top 12 Most CONTAMINATED Fruit...
Last post by Charles Pegge - July 05, 2024, 02:44:07 PM
The EU has stricter rules about pesticides and herbicides than Australia/USA

Self Sufficient Me
Australia
26 may 2024

#26
General Discussion / Re: How Big Tech Ruined Farmin...
Last post by Zlatko Vid - July 05, 2024, 01:15:41 PM
I hate them ..they ruined natural life in generalthey simply forced people
to eat junk with poisoned chemicals.
#27
OxygenBasic / Re: General questions
Last post by Charles Pegge - July 04, 2024, 09:17:52 PM
Most IDEs will allow you to specify compiler, file paths and keyword lists for syntax highlighting. I understand that in more specialized IDEs, AI is also deployed in auto-complete and possible code generation.
#28
General Discussion / How Big Tech Ruined Farming
Last post by Charles Pegge - July 04, 2024, 07:30:04 PM
Wendover Productions
27 jun 2024

#29
General Discussion / Are we too many people, or too...
Last post by Charles Pegge - July 04, 2024, 02:29:38 AM
Sabine Hossenfelder
2 jul 2022

#30
General Discussion / Why Bill Gates’ New Natrium Re...
Last post by Charles Pegge - July 03, 2024, 03:57:00 AM
Sabine Hossenfelder