Slimelite BBS

Private_String_CPP.zip

Back to gcc

Private String in CPP code,g++ compiled

Size
281K (287,318 bytes)
Added
2026-11-20 02:43
Downloads
2
Long Description
============================================================================ Architectures: Classic AMIGA emulation FS-UAE on OSX 10.15.x and Mint 22.3. --------------------------------------------------------------------------- MINIMUM Requirements Are:- -------------------------- Amiga environment:- FS-UAE on Intel APPLE OSX 10.15.x and GNU/Linux Mint Cinnamon 22.3. Standard default AMIGA OS_3.0.x install or better, set up with 4MB of FastRAM. Full ADE install is needed. http://aminet.net/package/dev/gcc/ADE Also... https://aminet.net/package/util/libs/ixemul-48.0 ---------------------------------------------------------------------------- History:- --------- 25-05-2026. ----------- Version 1.00.00. Probably the one and only upload for this archive. ---------------------------------------------------------------------------- General, consider this the manual:- ----------------------------------- (Apologies for any typos, etc...) Inserting A Private String Inside CPP Code, compiled Using g++ 2.95.3. ---------------------------------------------------------------------- This assumes that you have both 'ADE' and 'ixemul-48.0' fully installed and configured. A few years ago on this site this thread started, which I solved: https://www.unix.com/programming/279864-embed-text-c-code.html And I finalised it here: https://www.unix.com/programming/281218-private-string-embedded-inside-c-code.html As a conclusion to my aging gcc C source...... https://aminet.net/package/dev/gcc/embed_private_strings.c ......I thought I would add a pure ANSI CPP version. This has been only tested on FS-UAE with AMIGA OS 3.0x installed along with 4MB of FastRAM as part of the emulation on both Intel GNU/Linux Mint 22.3, and, Intel Apple OSX 10.15.x. It has not been tested on MY real hardware, but there is no reason why it should not work. !!!IMPORTANT!! -------------- Before even trying there may be an alteration needed to the assembl[er][y] instruction inside the code for the architecture you are using. READ the 'Architectures_Without_JMP.txt' if you are NOT using, most Intel or Motorola 68K systems. For example, the M? series silicon for current APPLE gear will need to be changed from 'jmp' to 'b' before compiling, AFAIK the 'b' IS lower case. (I don't have any current M-Series APPLE gear so this becomes untested.) On the AMIGA A1200(HD) emulation:- YOUR private string has a maximum ASCII character line length of 249, allowing for both SINGLE QUOTES, and any trailing newline and NULL characters at the end, to give a total of 255 characters. On Intel, GNU/Linux Mint Cinnamon 22.3:- YOUR private string has a maximum POSIX ASCII character line length of 2041, allowing for both SINGLE QUOTES, and any trailing newline and NULL characters at the end, to give a total of 2048 characters. On the two current architectures catered for:- The string, INSIDE the SINGLE QUOTES, MUST be an ODD number of ASCII characters long. If it is EVEN then just add a space character at the end. READ the code for much more information. Start ADE as per the _manual_ or instructions and go to the drawer where the source code is saved. Mine is in:- /SYS/ADE/home/C/Private_String.cpp Compile using:- g++ -Wall -ansi -Os -o Private_String Private_String.cpp This will take a few seconds, (25[ish]), to compile... When you view the hexdumps you will notice that the data sections are not same in the AMIGA g++ 2.95.3 executable and much later versions of g++ executables for other platforms. It does not alter the position of the hidden string however. If the Private_String function is the very first then the hidden string will be near the top of the working code body. ---------------------------------------------------------------------------- IMPORTANT:-