Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

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.

Hexidecimal to Decimal

Featured Replies

Posted

Hi :)

Recently i've started a project which requires displaying output as a decimal number in ASCII characters.

I've done the Hex value - to - ascii char thing but conversion of the number ... say - 2012 from hex (which is 0x07dc)

to a decimal number displayed on the screen (2012) is a bit more difficult.

Example : eax == 07dc i want to display in a messagebox the decimal value of eax. how do i make it decimal?

Thanks

What language are you coding this in?

Here is a function of me coded for Delphi performing that task, I hope it could be helpful:

function IntegerToString(Quantity: Int64): String;
var
Remainder: Integer;
begin
Result := '';
Repeat
Remainder := Quantity MOD 10;
Result := Chr(Remainder + Ord('0')) + Result;
Quantity := Quantity DIV 10;
until Quantity = 0;
end;

Edited by Nacho_dj

  • Author

erm... i forgot :P

MASM

masm32\help\masmlib\Conversions

all functions as sources masm32\m32lib

also, check the winapis printf/sprintf/wsprintf.

Create an account or sign in to comment

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.