Difference between revisions of "83Plus:BCALLs:8018"

From WikiTI
Jump to: navigation, search
 
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
== Synopsis ==
 +
'''Official Name:''' MD5Final
  
Use this template for ROMCalls on calculators that don't use banked OS calls. Simply replace every occurance of bcall/BCALL/b_call with romcall/ROMCall/call.
+
'''Other Name:''' FinishMD5
  
The BCALLs are named by their b_call address, in hexadecimal. An example is [[83Plus:BCALLs:4009]].
+
'''BCALL Address:''' 8018
  
----
+
Finishes an MD5 hash by adding padding and length bits.
 
+
== Synopsis ==
+
'''Official Name:''' ProveTheRiemannHypothesis
+
 
+
'''BCALL Address:''' 0042
+
 
+
Proves the Riemann Hypothesis, storing the proof in an AppVar.
+
  
 
=== Inputs ===
 
=== Inputs ===
* [[83Plus:RAM:8478|OP1]]: AppVar to save proof into
+
* [[83Plus:RAM:8269|8269]]: (4 bytes) Holds the length in bits of the data hashed so far.
* HL: Maximum length of proof, in pages (must be at least 200)
+
* [[83Plus:RAM:8292|8292]]: (16 bytes) Current MD5 hash
* bit proofCorrect, (iy + proofFlags): Set to generate a correct proof
+
  
 
=== Outputs ===
 
=== Outputs ===
* Proof stored in AppVar
+
* [[83Plus:RAM:8292|8292]]: (16 bytes) Completed MD5 hash
* Zero Flag: Set if successful
+
  
 
=== Destroys ===
 
=== Destroys ===
* af
+
* [[83Plus:RAM:8259|8259]]: (16 bytes) Alternate registers (roughly equivalent to the AA, BB, CC, and DD registers specified in the MD5 standard.)
 +
* [[83Plus:RAM:83A5|83A5]]: (64 bytes) Buffer holding data to be hashed.
  
 
== Comments ==
 
== Comments ==
This B_CALL proves the Riemann Hypothesis, giving a proof under the required number of pages. It does this by randomly guessing proofs until it finds one that works. Needless to say, the calculator's batteries will run out before this B_CALL completes.
+
This B_CALL "completes" a hash started by [[83Plus:BCALLs:808D|808D]] and [[83Plus:BCALLs:8090|8090]].
 
+
== Example ==
+
NaodW29-nowiki8e12bb1231d78a400000001
+
  
== Credits and Contributions ==
+
== Example ==  
* '''/dev/null:''' For not answering my questions about this B_CALL
+
<nowiki>B_CALL InitializeMD5
 +
ld bc,0040h
 +
ld hl,SomeAddress
 +
B_CALL CalculateMD5
 +
B_CALL FinishMD5</nowiki>

Revision as of 18:20, 27 March 2005

Synopsis

Official Name: MD5Final

Other Name: FinishMD5

BCALL Address: 8018

Finishes an MD5 hash by adding padding and length bits.

Inputs

  • 8269: (4 bytes) Holds the length in bits of the data hashed so far.
  • 8292: (16 bytes) Current MD5 hash

Outputs

  • 8292: (16 bytes) Completed MD5 hash

Destroys

  • 8259: (16 bytes) Alternate registers (roughly equivalent to the AA, BB, CC, and DD registers specified in the MD5 standard.)
  • 83A5: (64 bytes) Buffer holding data to be hashed.

Comments

This B_CALL "completes" a hash started by 808D and 8090.

Example

B_CALL InitializeMD5
ld bc,0040h
ld hl,SomeAddress
B_CALL CalculateMD5
B_CALL FinishMD5