English
Source / code snippets

Prüfsumme for long Hexcode-String detect/checken

 

p.specht

to input of (small) Maschinenprogrammen in XProfan-versions without Inline-Assembler suit itself u.a. long Hex-Strings with numbers in the area 0..9+A..F , per "word" bestehend each from 4 characters.
circa Abstürze and Hacks To avoid, ought to one whom korrekten Transfer by a Prüfsumme confirm let. the nachstehende Machwerk generiert or. checks on a such, the ausgewertete String self is here only as example virtual.
Window Title "PRÜFSUMME FOR HEXSTRING"
Var c$="5589E58B75088B068B56042B46101b5614890689560431FF09D2790EFFC7F7D883d200F7DA89068956048B5E088B760C0"+\
"9F67909FFC7F7DB83d200F7DE751509DB745D89C189D031D2F7F387C8F7F3E9330000000fbdceFEC1530fadf30fadd0d3eaF7F389C3F7"+\
"E689C158568B7508F7E301CA720B3B5604770672063B067602FFCB5E31C989D8FFCF7507F7D883d100F7D98B7508894618894E1CE90E000000"+\
"31C0FFC8B9FFFFFF7FE9D9FFFFFF89EC5DC20400"
Declare p$,w&,s!,l%,m%
l%=Len(c$):Casenote l%:c$="0000"
l%=Len(c$):m%=l% Mod 4

If m%=1:c$=c$+"000"

ElseIf m%=2:c$=c$+"00"

ElseIf m%=3:c$=c$+"0"

EndIf

s!=1'<<< your salt
l%=Len(c$)

WhileLoop 0,l%-4,4

    s!=s!+Val("$"+Mid$(c$,&Loop+1,4))

EndWhile

P$=stature$("%g",s!)
ClearClip:PutClip p$'<<< ought to in the Echtprogramm out!!!!!!!!!!!!
Print "  HEXSTRING-PRÜFSUMME = ";P$

If P$="2980236":Print "\n  PRÜFSUMME OK."

    Else: Print "\n  *** FEHLER: PRÜFSUMME STIMMT NOT! ***"
    Sound 1300,400:WaitInput:End

EndIf

WaitInput 1000
Beep:Print "\n\n  HAUPTPROGRAMM: CALL-commands would now statthaft!"
WaitInput
 
Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'...
04/05/21  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

634 Views

Untitledvor 0 min.
N.Art07/23/21
Glubbfan06/19/21
Uwe ''Pascal'' Niemeier06/13/21
Walter05/10/21
More...

Themeninformationen

this Topic has 1 subscriber:

p.specht (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie