Coming from PowerBASIC - 64-bit migration checklist
PBXB64 produces 64-bit code, so a few PowerBASIC habits change. This page carries the complete checklist from the V23 product page. The rules are documentation/source evidence; no new compiler or functional test was run for this publication.
Download V10 packageBack to PBXB64Feature referenceDeutsche FassungFree for private use · one ZIP, about 355 MB · License
Checklist
| Topic | PBXB64 V23 behavior |
|---|---|
| LONG | 8 bytes (64-bit). Use SDWORD / LONG32 where a 32-bit value is required (Win32 int). |
| INTEGER | 2 bytes since V23 (was 8). See MIGRATION_V23_INTEGER_TYPES.md. For old 64-bit data use QUAD. |
| Handles and pointers | Use QUAD or a PTR type. DWORD truncates 64-bit values. |
| Constants | Out-of-range constants are compile errors (PB_FRONTEND-8531); run-time stores wrap. CUINT8(300) = 44. |
| TYPE size | A default TYPE is padded to a multiple of 8 (a 12-byte payload gives SIZEOF 16). TYPE name QWORD FILL gives the exact C sizeof. |
| DECLARE ... LIB | Win32 int parameters and results as SDWORD, handles as QUAD (sample 10). |
| Memory | ALLOCATE; FREE is a function; PEEK/POKE use 64-bit addresses (sample 4). |
| Pointers | @p dereferences; p = p + 1 advances by target size. @p[i] is not valid. |
| Includes | Use -I Includes and #INCLUDE "windows_core.pbi"; the legacy Win32API include set is not shipped. |
| SUB parameters | Default BYREF (observed). |
| Division | / on integers is true division (7/2 = 3.5); (5>3) = -1. |
| Threads | The THREAD CREATE target must be a FUNCTION (sample 6). |
| EXE size / imports | About 75 KB for hello world; imports only Windows DLLs. |
Concrete migration patterns
These patterns illustrate the documented width and API rules. They are guidance, not newly executed qualification tests.
INTEGER records
TYPE OldRec
id AS QUAD
count AS QUAD
END TYPE
TYPE NewRec
id AS INTEGER
count AS INTEGER
END TYPE
' Narrow deliberately at the migration boundary.
n.id = o.id
n.count = CINT(o.count AND &HFFFF)Win32-style declarations
' Win32 int is 32-bit; a handle is pointer-sized.
DECLARE FUNCTION GetValue LIB "example.dll" () AS SDWORD
DECLARE FUNCTION OpenThing LIB "example.dll" (BYVAL name AS STRING) AS QUADPointer arithmetic
LOCAL p AS BYTE PTR
p = ALLOCATE(64)
POKE BYTE, p, 1
p = p + 1
ignored = FREE(p - 1)Historical V23 example
PBXB64.exe 03_migration.bas -o 03_migration.exe
id = 7 | count =-25536
INTEGER range:-32768 .. 32767 | w =-1
CUINT8(300) = 44The original page records this sample as compiled and run with PBXB64 V23 on 5 October 2026. That historical receipt is preserved; this detail page adds no new execution claim.
What next
The checklist lists the rules; you can try them with PBXB64 in the V10 package, examples included. The data types reference and the feature reference go deeper on each point. For larger PowerBASIC applications we help with the migration – the first assessment based on a code sample is free.
Download V10 packageHelp with migrationFree intro callPrivate, non-commercial use is free. Business, team and commercial use goes through Smart Package Robot or by email to info@it-berater.org. The LICENSE.txt in the package is authoritative.