Difference between revisions of "BCALLs Template"

From WikiTI
Jump to: navigation, search
Line 1: Line 1:
 
== Synopsis ==
 
== Synopsis ==
'''Official Name:''' SomeCall
+
'''Official Name:''' ProveTheRiemannHypothesis
  
 
'''BCALL Address:''' 0042
 
'''BCALL Address:''' 0042
  
This ROM Call does absolutely nothing since it doesn't exist. :)
+
Proves the Riemann Hypothesis, storing the proof in an AppVar.
  
 
=== Inputs ===
 
=== Inputs ===
* a: Page to look copy from
+
* OP1: AppVar to save proof into
* de: Address to copy to
+
* HL: Maximum length of proof, in pages (must be at least 200)
* hl: Address to copy from
+
* [[83Plus:RAM:proofData|proofData]]: An example of a known RAM block.
* (de): A byte is copied from here
+
* bit proofCorrect, (iy + proofFlags): Set to generate a correct proof
* [[83Plus:RAM:keyExtend|keyExtend]]: An example of a known RAM block.
+
* bit exampleBit, (iy+demoBye): Set to do something, reset to do s omething else
+
*Parity: Set for something
+
  
 
=== Outputs ===
 
=== Outputs ===
*(hl): A byte is copied to here
+
* Proof stored in AppVar
*Zero: Set if successful
+
* Zero Flag: Set if successful
  
 
=== Registers Destroyed ===
 
=== Registers Destroyed ===
*af
+
* af
 +
 
 +
== 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.
  
 
== Example ==
 
== Example ==
  <nowiki>ld a,$08
+
  <nowiki>ld hl, ProofAppVar
ld de,$567A
+
rst rMOV9TOOP1
ld hl,keyExtend
+
ld hl, 1000
b_call SomeCall</nowiki>
+
B_CALL ProveTheRiemannHypothesis</nowiki>

Revision as of 08:30, 25 March 2005

Synopsis

Official Name: ProveTheRiemannHypothesis

BCALL Address: 0042

Proves the Riemann Hypothesis, storing the proof in an AppVar.

Inputs

  • OP1: AppVar to save proof into
  • HL: Maximum length of proof, in pages (must be at least 200)
  • proofData: An example of a known RAM block.
  • bit proofCorrect, (iy + proofFlags): Set to generate a correct proof

Outputs

  • Proof stored in AppVar
  • Zero Flag: Set if successful

Registers Destroyed

  • af

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.

Example

ld  hl, ProofAppVar
rst rMOV9TOOP1
ld  hl, 1000
B_CALL ProveTheRiemannHypothesis