Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Example of calldll tcc returning values

Featured Replies

  • Author
  • Localization

aluigi, posted Thu Feb 03, 2022 9:49 pm (69609)


In case someone is interested in a different example of calldll tcc (the embedded C code of quickbms), it includes:
- malloc and memset, don't worry about the implicit declaration "warning" messages at runtime
- returning a buffer as a variable
- returning an integer as a variable passed as argument
- print hexdump with size

Code:
set MEMORY_FILE10 string "
unsigned char *func(
    int size,
    int *output_int
) {
    unsigned char   *data = malloc(size);
    memset(data, 'a', size);
    *output_int = 12345678;
    return data;
}
"

math RET2 = 0   # it must be declared first
math SIZE = 123

calldll MEMORY_FILE10 func tcc &RET SIZE &RET2

print "%RET2%"
print "%RET|hexdump SIZE%"

Not sure why RET2 must be declared first.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.