News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

QR-Code

Started by Biterider, November 21, 2022, 07:52:12 AM

Previous topic - Next topic

jj2007

Quote from: TimoVJL on November 26, 2022, 08:40:05 AM
Actually dlls was just for examples, so everyone can try them.
Static libraries are usually difficult cases for too many programmers, as they often have linking time problems.

Real static libraries are ok. What makes trouble are import libraries. They are fake. Most of the Masm32 SDK "static" libraries link to C:\Windows\System32\ DLLs - no problem, as these DLLs are always present on a Windows machine. But as soon as you import functions from a DLL that happens to sit only in your QR code folder, the exe doesn't work any more if you move it to a different folder.

jj2007

I've run some tests comparing:

a) Jack's version: libqrencode32Jack.dll, 62974 bytes of 22.11.22, 03:15:50
b) Timo's version: qrcodegen_na_msvcrt.lib, 4648 bytes of 25.11.22, 00:48:34

Both support strings up to 2933 bytes, Timo's version up to 2940 or so. However, the codes generated by Jack's dll are slightly more easy to recognise by my smartphone reader.

Sources & executables here

Biterider

Hi Jack
Quote from: jack on November 25, 2022, 11:38:32 PM
I wonder if QR could be used to backup small programs on paper and then restored?
This reminds me of an old project that works perfectly https://ollydbg.de/Paperbak/.
I found this when I was looking for the "PaperBack" https://github.com/cyphar/paperback  :tongue:

Biterider

TimoVJL

#48
a static library made with msvc 2022
i haven't tested it.

Original code:
* Copyright (c) Project Nayuki. (MIT License)
* https://www.nayuki.io/page/qr-code-generator-library

EDIT
static library test, asm code borrowed from jj2007model flat, c
.486
includelib qrcodegen_na
qrcodegen_Mask_AUTO = -1
qrcodegen_encodeText PROTO C :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
qrcodegen_Ecc_HIGH=3
qrcodegen_VERSION_MIN=1 ; The minimum version number supported in the QR Code Model 2 standard
qrcodegen_VERSION_MAX=40 ; The maximum version number supported in the QR Code Model 2 standard
qrcodegen_BUFFER_LEN_MAX=3917
;...
.DATA
stext db "https://www.nayuki.io/",0
.DATA?
qrcode db qrcodegen_BUFFER_LEN_MAX dup(?)
tempBuffer db qrcodegen_BUFFER_LEN_MAX dup(?)
.CODE
mainCRTStartup:
LoadQR:
  ;mov pData, offset qrcode
  invoke qrcodegen_encodeText, addr stext, addr tempBuffer, addr qrcode,
     qrcodegen_Ecc_HIGH, qrcodegen_VERSION_MIN, qrcodegen_VERSION_MAX, qrcodegen_Mask_AUTO, 1
  ret
END LoadQR
May the source be with you

daydreamer

Quote from: jack on November 25, 2022, 11:38:32 PM
I wonder if QR could be used to backup small programs on paper and then restored?
say that you split an exe for example into chunks and then create the QR's and print them on paper for backup, how many bytes per page could be saved ?
see https://stackoverflow.com/questions/11065415/how-much-data-information-can-we-save-store-in-a-qr-code
That reminds me of spy novels, sending info by microscopic size secret documents
But uncompressed source it's limited to contain lot of repeated strings triple or more space
Especially asm snippet Unrolled many times for speed

my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding

HSE

#50
Hi JJ!

Quote from: jj2007 on November 26, 2022, 02:09:53 AM
Demo14 assembles fine but I have no idea what the 2560 byte exe is supposed to do.

Some little demos show things in DebugCenter. If DebugCenter fail to open You will see nothing.

LATER: but apparently Demo14 fail  :thumbsup:

MORE LATER: what fail is my memory  :biggrin: :biggrin: I don't used make.bat with ObjAsm32!

To see something, program must be assembled in debug mode (like RadAsm Project state). To use make.bat, must be replaced OA32_ASM_RLS with OA32_ASM_DBG inside it.
             


Quote from: jj2007 on November 26, 2022, 02:09:53 AM
With CrtDLL.inc, Demo07:

Demo08: ...

I found a more pristine ObjAsm32 installation, and I obtain exactly your same errors  :biggrin:

You have ObjAsm32 running. Congratulations!!

Regards, HSE
Equations in Assembly: SmplMath

HSE

#51
Just in case, Demo14 work perfectly (see above)

And Demo8 work with TBBUTTONINFOW and HtmlHelpA (perhaps it's not original Masm32SDK's htmlhelp.lib)

In Graph2D.inc just replaced function CRTDLL_snprintf. That was an old discussion I don't remember  :biggrin: :biggrin:
Equations in Assembly: SmplMath