Recent posts

#51
General Discussion / Tyrannosaurus rex: Everything ...
Last post by Charles Pegge - July 11, 2024, 08:33:29 PM
Tyrannosaurus rex: Everything We Know Is Wrong | Rediscovering T-Rex

The Reptile Room
22 may 2024


#52
General Discussion / Re: Meet The Plastic-Eating Wo...
Last post by Theo Gottwald - July 11, 2024, 09:46:46 AM
#53
General Discussion / The Rise and Fall of the Cray ...
Last post by Charles Pegge - July 10, 2024, 05:56:00 PM
Asianometry
8 July 2024

#54
General Discussion / Meet The Plastic-Eating Worms ...
Last post by Charles Pegge - July 08, 2024, 11:16:10 PM
BBC Earth Science
22 apr 2023

#55
General Discussion / This Slime Could Change The Wo...
Last post by Charles Pegge - July 08, 2024, 10:06:10 PM
BBC Earth Science
9 apr 2023


#56
OxygenBasic Examples / Re: Asm Help hello basic
Last post by Frank Brübach - July 06, 2024, 04:12:35 PM
Hello ..

Thanks Charles.. Made my example how I Had in my mind after I have Seen that old Listing in my old Computer book..


'' Simplest Assembler "HELLO BASIC", "THANK YOU BASIC"
'' Oxygen Basic, by frank bruebach, 06-07-2024
'' thx charles :-)
''
uses console

'' 32bit asm
sys a = strptr "10: PRINT 'HELLO BASIC! ' "
push a
printl ""
call output#string

'20: printl "20: HELLO BASIC!" cr
sys b = strptr "20: RUN " '+ cr
push b
printl ""
call output#string

'30: printl "30: RUN" cr

sys c = strptr "30: HELLO BASIC " '+ cr
push c
printl ""
call output#string

sys d = strptr "40: READY " '+ cr
push d
printl ""
call output#string

sys d = strptr "50: PRINT 'THANK YOU, BASIC! ' " '+ cr
push d
printl ""
call output#string

sys e = strptr "60: RUN " '+ cr
push e
printl ""
call output#string

sys f = strptr "70: END " '+ cr
push f
printl ""
call output#string
'
wait

''
'' listing program by '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
#57
General Discussion / computers suck at division (a ...
Last post by Charles Pegge - July 06, 2024, 12:40:36 PM
Early ARM cores

Low Level Learning
1 dec 2022

#58
OxygenBasic Examples / Re: Asm Help hello basic
Last post by Charles Pegge - July 06, 2024, 12:32:59 PM
Simplest Assembler:

uses console
sys p = strptr "Hello World!"
'32bit asm
push p
call output#string
wait
#59
OxygenBasic Examples / Re: Asm Help hello basic
Last post by Theo Gottwald - July 06, 2024, 10:34:18 AM
I'm just playing around with the new intern LM local AI. 🤖💻

Local AI means that what you write is not sent into the cloud ☁️,
but my local CPU 🖥� runs the AI and generates the answer.

The result may not have the quality of the normal cloud AI 🌐,
but take a look—maybe you can learn something from it. 📚✨

#LocalAI #AI #TechExperiment #MachineLearning #Privacy #Innovation #FutureTech 🚀🔍

QuoteI understand that you want to keep as much of the original structure or coding styles, including inline assembly (ASM). However, there are some issues with your existing code. Inline Assembly is not typically used in PowerBasic for standard printing tasks; instead, it's usually preferred and more appropriate for lower-level system interactions like device driver programming.

Here's a refined version that follows good practices while maintaining as much of the structure from the original script:

```
using 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"

DIM hConsoleOutput AS LONG
DIM lpNumberOfCharsWritten AS LONG : lpNumberOfCharsWritten = LEN("HELLO BASIC!")
DIM msg1 AS STRING: DIM msg2 AS STRING

msg1 = "HELLO BASIC!"
msg2 = "THANK YOU, BASIC!"

hConsoleOutput = -11 ' STD_OUTPUT_HANDLE

' Print "HELLO BASIC!" using inline Assembly
'
ASM
    mov eax, hConsoleOutput   ; Get console handle.
    mov ebx, msg1              ; Pointer to message string.

    cld                          ; Clear direction flag (for scasb).
 
    xor ecx, ecx                ; Clear counter register.
   
    repne scasb                 ; Compare each byte of the buffer until null character is found or 0 times if null char not found.

    jmp EndPrint
EndPrint:
   
    mov eax, hConsoleOutput   ; Get console handle again as per MSDN it needs to be passed every time.
    mov ebx, msg1              ; Pointer back to message string.

    lea ecx, lpNumberOfCharsWritten ; Number of characters written so far

    call WriteConsole
ASMEnd

print "ok2"

' Print "THANK YOU, BASIC!" using inline Assembly
 
ASM
    mov eax, hConsoleOutput   ; Get console handle.
    mov ebx, msg2              ; Pointer to message string.

    cld                          ; Clear direction flag (for scasb).
 
    xor ecx, ecx                ; Clear counter register.
   
    repne scasb                 ; Compare each byte of the buffer until null character is found or 0 times if null char not found.

    jmp EndPrint
EndPrint:
   
    mov eax, hConsoleOutput   ; Get console handle again as per MSDN it needs to be passed every time.
    mov ebx, msg2              ; Pointer back to message string.

    lea ecx, lpNumberOfCharsWritten ; Number of characters written so far

    call WriteConsole
ASMEnd

print "ok3"
wait
```

Here are the changes and improvements:

1. Replaced some of your comments with a more accurate description for clarity.
2. Fixed syntax errors in inline Assembly code blocks by adding missing closing labels (`ASMEnd`) to ensure correct execution flow as per PowerBasic's requirements.

This should resolve most of the issues you were facing, allowing you to use this script effectively within an environment like PowerBasic that supports Windows API calls and allows for simple assembly language. Remember to compile your program correctly with a compiler compatible with PowerBasic or similar environments before running it on your target platform!
using 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"

DIM hConsoleOutput AS LONG
DIM lpNumberOfCharsWritten AS LONG : lpNumberOfCharsWritten = LEN("HELLO BASIC!")
DIM msg1 AS STRING: DIM msg2 AS STRING

msg1 = "HELLO BASIC!"
msg2 = "THANK YOU, BASIC!"

hConsoleOutput = -11 ' STD_OUTPUT_HANDLE

' Print "HELLO BASIC!" using inline Assembly
'
ASM
    mov eax, hConsoleOutput   ; Get console handle.
    mov ebx, msg1              ; Pointer to message string.

    cld                          ; Clear direction flag (for scasb).
 
    xor ecx, ecx                ; Clear counter register.
   
    repne scasb                 ; Compare each byte of the buffer until null character is found or 0 times if null char not found.

    jmp EndPrint
EndPrint:
   
    mov eax, hConsoleOutput   ; Get console handle again as per MSDN it needs to be passed every time.
    mov ebx, msg1              ; Pointer back to message string.

    lea ecx, lpNumberOfCharsWritten ; Number of characters written so far

    call WriteConsole
ASMEnd

print "ok2"

' Print "THANK YOU, BASIC!" using inline Assembly
 
ASM
    mov eax, hConsoleOutput   ; Get console handle.
    mov ebx, msg2              ; Pointer to message string.

    cld                          ; Clear direction flag (for scasb).
 
    xor ecx, ecx                ; Clear counter register.
   
    repne scasb                 ; Compare each byte of the buffer until null character is found or 0 times if null char not found.

    jmp EndPrint
EndPrint:
   
    mov eax, hConsoleOutput   ; Get console handle again as per MSDN it needs to be passed every time.
    mov ebx, msg2              ; Pointer back to message string.

    lea ecx, lpNumberOfCharsWritten ; Number of characters written so far

    call WriteConsole
ASMEnd

print "ok3"
wait
#60
🚀 Introducing the new top star in local AI! 🌟

With a million-token context window, this powerhouse runs entirely on your computer. 🖥�💡

No data is sent to the internet, ensuring maximum privacy. 🔒✨

This is a significant leap for those aiming to tackle more complex tasks with locally running artificial intelligence. 🤖🔍

Imagine pairing it with LM Studio – the possibilities are endless! 🌐🔥

I could get t to run with LM Studio. (InternLM Chat FP16 F16 gguf).
Of course running on a local system this is much slower then commercial AI's like Claude or ChatGPT.
But it works.

2024-07-06 09_44_09-LM Studio.png

Its "Up to date", it even knows for example how to call the Bitget-API:


2024-07-06 09_53_44-LM Studio.png


It will also run with GPT4All but in my test the Output was broken.

2024-07-06 10_16_06-GPT4All v3.0.0.png


#AI #Tech #Innovation #LocalAI #Privacy #GPT3 #ArtificialIntelligence 🤖🔒💡🚀🌟