Difference between revisions of "BCALLs Template"

From WikiTI
Jump to: navigation, search
m (Destroys: capitalized AF)
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Example of a BCALL Wiki =
+
'''Note:''' Do not take the information on this template page as actual documentation!
If your BCALL is something simple, you may omit some (or all) of these sections and just give a Synopsis. Please provide as many sections as you can.
+
----
+
  
== Synopsis ==
+
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.
'''Official Name:''' SomeCall
+
<br>'''BCALL Address:''' $4444
+
<br>This ROM Call does absolutely nothing since it doesn't exist. :)
+
  
== Register Inputs ==
+
The BCALLs are named by their b_call address, in hexadecimal. An example is [[83Plus:BCALLs:4009]].
<ul>
+
<li>a: Page to look copy from
+
<li>de: Address to copy to
+
<li>hl: Address to copy from
+
</ul>
+
  
== Register Outputs ==
+
Also, please put the following code (edited to reflect your call) in your page:
''None.''
+
<nowiki>[[Category:83Plus:BCALLs:By Name|ProveTheRiemannHypothesis]]
 +
[[Category:83Plus:BCALLs:By Name:Utility|ProveTheRiemannHypothesis]]
 +
[[Category:83Plus:BCALLs:By Address|0042 - ProveTheRiemannHypothesis]]</nowiki>
 +
This will cause your page to show in the appropriate categories. (Change the ProveTheRiemannHypothesis, 0042, and Utility to match your call. Also, change the 83Plus to whatever category, and change the BCALLs to ROMCalls if needed.) You may put a BCALL in any number of "By Name" categories. Put it in all the ones that make sense.
  
== Memory Inputs ==
+
----
<ul>
+
<li>(de): Address to copy a byte from
+
<li>[[83Plus:RAM:keyExtend|keyExtend]]: An example of a known RAM block.
+
</ul>
+
  
== Memory Outputs ==
+
== Synopsis ==
<ul>
+
'''Official Name:''' ProveTheRiemannHypothesis
<li>(hl): Address to copy a byte to
+
</ul>
+
 
+
== Registers Destroyed ==
+
<ul>
+
<li>af
+
</ul>
+
 
+
== Flag Inputs ==
+
<ul>
+
<li>bit exampleBit, (iy+demoBye): Set if something, reset otherwise
+
<li>Parity: Set for something
+
</ul>
+
 
+
== Flag Outputs ==
+
<ul>
+
<li>Zero: Set if successful
+
</ul>
+
 
+
== Example ==
+
<nowiki>ld a,$08
+
ld de,$567A
+
ld hl,keyExtend
+
b_call SomeCall</nowiki>
+
 
+
= Code Used to Produce the Above =
+
Please use this code as the starting point for all BCALL entries.
+
 
+
<nowiki>== Synopsis ==
+
'''Official Name:''' SomeCall
+
<br>'''BCALL Address:''' $4444
+
<br>This ROM Call does absolutely nothing since it doesn't exist. :)
+
 
+
== Register Inputs ==
+
<ul>
+
<li>a: Page to look copy from
+
<li>de: Address to copy to
+
<li>hl: Address to copy from
+
</ul>
+
  
== Register Outputs ==
+
'''BCALL Address:''' 0042
''None.''
+
''Use "Call Address" for regular 83.''
  
== Memory Inputs ==
+
Proves the Riemann Hypothesis, storing the proof in an AppVar.
<ul>
+
<li>(de): Address to copy a byte from
+
<li>[[83Plus:RAM:keyExtend|keyExtend]]: An example of a known RAM block.
+
</ul>
+
  
== Memory Outputs ==
+
=== Inputs ===
<ul>
+
* [[83Plus:RAM:8478|OP1]]: AppVar to save proof into
<li>(hl): Address to copy a byte to
+
* HL: Maximum length of proof, in pages (must be at least 200)
</ul>
+
* bit proofCorrect, (iy + proofFlags): Set to generate a correct proof
 +
<!-- We need to figure out how we're doing flags and link that up -->
  
== Registers Destroyed ==
+
=== Outputs ===
<ul>
+
* Proof stored in AppVar
<li>af
+
* Zero Flag: Set if successful
</ul>
+
  
== Flag Inputs ==
+
=== Destroys ===
<ul>
+
* AF
<li>bit exampleBit, (iy+demoBye): Set if something, reset otherwise
+
<li>Parity: Set for something
+
</ul>
+
  
== Flag Outputs ==
+
== Comments ==
<ul>
+
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.
<li>Zero: Set if successful
+
</ul>
+
  
 
== Example ==
 
== Example ==
  <nowiki>ld a,$08
+
  <nowiki>ld hl, ProofAppVar
ld de,$567A
+
rst rMOV9TOOP1
ld hl,keyExtend
+
ld hl, 1000
b_call SomeCall&lt;/nowiki></nowiki>
+
B_CALL ProveTheRiemannHypothesis</nowiki>
  
Please note the space in front of the &lt;nowiki> tag!
+
== Credits and Contributions ==
 +
* '''/dev/null:''' For not answering my questions about this B_CALL

Latest revision as of 07:45, 24 April 2005

Note: Do not take the information on this template page as actual documentation!

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.

The BCALLs are named by their b_call address, in hexadecimal. An example is 83Plus:BCALLs:4009.

Also, please put the following code (edited to reflect your call) in your page:

[[Category:83Plus:BCALLs:By Name|ProveTheRiemannHypothesis]]
[[Category:83Plus:BCALLs:By Name:Utility|ProveTheRiemannHypothesis]]
[[Category:83Plus:BCALLs:By Address|0042 - ProveTheRiemannHypothesis]]

This will cause your page to show in the appropriate categories. (Change the ProveTheRiemannHypothesis, 0042, and Utility to match your call. Also, change the 83Plus to whatever category, and change the BCALLs to ROMCalls if needed.) You may put a BCALL in any number of "By Name" categories. Put it in all the ones that make sense.


Synopsis

Official Name: ProveTheRiemannHypothesis

BCALL Address: 0042 Use "Call Address" for regular 83.

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)
  • bit proofCorrect, (iy + proofFlags): Set to generate a correct proof

Outputs

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

Destroys

  • 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

Credits and Contributions

  • /dev/null: For not answering my questions about this B_CALL