Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php-versions: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
steps:
- name: Checkout
Expand Down
40 changes: 20 additions & 20 deletions pasm.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public static function carry_add()
</pre>
<pre class='pasm'>
* @method add uses addition to form $rdx from $ecx annd $ah
* @method add uses addition to form $rdx from $ecx and $ah
*
public static function add()
</pre>
Expand Down Expand Up @@ -66,21 +66,21 @@
public static function bit_test() // bit is filled in pointer
</pre>
<pre class='pasm'>
* @method bit_test_comp search thru arbitry $ecx for the $ahth bit
* @method bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value
*
* if given anything returned as true for a parameter, it will also set the $bitcmp flag
*
public static function bit_test_comp(bool $bitc = false) // look thru byte and see the $ah'th bit
public static function bit_test_comp(bool $bitc = false) // look through byte and see the $ah'th bit
</pre>
<pre class='pasm'>
* bit_test_comp search thru arbitry $ecx for the $ahth bit
* bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value reset $ecx to 0
*
public static function bit_test_reset() // Clear bit (ah) test flag
</pre>
<pre class='pasm'>
* @method bit_test_comp search thru arbitry $ecx for the $ahth bit
* @method bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value and ecx[$ah] to 1
*
public static function bit_test_set() // Test bit
Expand Down Expand Up @@ -283,7 +283,7 @@
public static function stack_cmov_ne()
</pre>
<pre class='pasm'>
* @method fcomp substracts the $ST0 stack pointer
* @method fcomp subtracts the $ST0 stack pointer
* from $ah and pops its last value off
*
public static function fcomp() // subtract top of stack from $ah and pop
Expand All @@ -295,7 +295,7 @@
public static function cosine() // change top of stack to cosine of top of stack
</pre>
<pre class='pasm'>
* @method stack_pnt_rev goes thru the stack backward,
* @method stack_pnt_rev goes through the stack backward,
* in reverse, and sets the $sp variable to its position
*
public static function stack_pnt_rev() // go traverse the stack backward
Expand Down Expand Up @@ -343,7 +343,7 @@
<pre class='pasm'>
* @method stack_load uses $key so it's indexable by string coefficient
* 'fc' so you can have the count of the reference rather than
* name it everytime
* name it every time
*
public static function stack_load() // stack with count on stack
</pre>
Expand Down Expand Up @@ -380,7 +380,7 @@
public static function subea() // like subtract but backwards
</pre>
<pre class='pasm'>
* @method subae substracts $ecx from $ah
* @method subae subtracts $ecx from $ah
* and puts the value in $rdx
*
public static function subae() // $ah - $ecx
Expand Down Expand Up @@ -545,7 +545,7 @@
<pre class='pasm'>
* @method fxch exchange values from one stack place to another (the top)
*
public static function fxch() //
public static function fxch() //
</pre>
<pre class='pasm'>
* @method fxtract get highest significand and exponent of number
Expand Down Expand Up @@ -590,7 +590,7 @@
<pre class='pasm'>
* @method in $string is server, collects in $buffer
*
public static function in() //
public static function in() //
</pre>
<pre class='pasm'>
* @method inc increment $ecx
Expand Down Expand Up @@ -645,7 +645,7 @@
<pre class='pasm'>
* @method jae jump while $ah >= $ecx
*
public static function jae()
public static function jae()
</pre>
<pre class='pasm'>
* @method jb jump while $ah < $ecx
Expand Down Expand Up @@ -804,19 +804,19 @@
public static function load_all_flags() // load all flags to $ah
</pre>
<pre class='pasm'>
* @method end
* @method end
* reset chains
*
public static function end()
</pre>
<pre class='pasm'>
* @method quit
* @method quit
* exits the program
*
public static function quit() // exit program
</pre>
<pre class='pasm'>
* @method ea
* @method ea
* move $ecx to $ah
*
public static function ea() // move ecx to ah
Expand All @@ -835,9 +835,9 @@
</pre>
<pre class='pasm'>
* @method coast
* Go thru rest of commands after $ldp drop
* Go through rest of commands after $ldp drop
*
public static function coast() // the secret sauce. Go thru rest of commands after $ldp drop
public static function coast() // the secret sauce. Go through rest of commands after $ldp drop
</pre>
<pre class='pasm'>
* @method loop requires that PASM::$ecx
Expand Down Expand Up @@ -899,7 +899,7 @@
<pre class='pasm'>
* @method or performs a not on $ah and $ecx
*
public static function or() // performs a or on ecx and ah
public static function or() // performs an or on ecx and ah
</pre>
<pre class='pasm'>
* @method out disperses $buffer to $conn (server connection with $string)
Expand Down Expand Up @@ -1057,7 +1057,7 @@
public static function setbe()
</pre>
<pre class='pasm'>
* @method setc set rd to ah if CF == 1
* @method setc set rd to ah if CF == 1
*
public static function setc()
</pre>
Expand Down Expand Up @@ -1252,7 +1252,7 @@
public static function xadd() // ah = $ah + ecx && rdx = ah
</pre>
<pre class='pasm'>
* @method xch move ecx to ah annd vice versa
* @method xch move ecx to ah and vice versa
*
public static function xch() // reverse ecx and ah
</pre>
Expand Down
46 changes: 23 additions & 23 deletions pasm.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php declare (strict_types = 1);
namespace pasm;
namespace pasm;

class PASM
{
Expand Down Expand Up @@ -150,7 +150,7 @@ public static function carry_add()
}

/**
* @method add uses addition to form $rdx from $ecx annd $ah
* @method add uses addition to form $rdx from $ecx and $ah
*
*/
public static function add()
Expand Down Expand Up @@ -275,13 +275,13 @@ public static function bit_test() // bit is filled in pointer
}

/**
* @method bit_test_comp search thru arbitry $ecx for the $ahth bit
* @method bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value
*
* if given anything returned as true for a parameter, it will also set the $bitcmp flag
*
*/
public static function bit_test_comp(bool $bitc = false) // look thru byte and see the $ah'th bit
public static function bit_test_comp(bool $bitc = false) // look through byte and see the $ah'th bit
{
PASM::setup_chain(__METHOD__);

Expand All @@ -294,7 +294,7 @@ public static function bit_test_comp(bool $bitc = false) // look thru by
}

/**
* bit_test_comp search thru arbitry $ecx for the $ahth bit
* bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value reset $ecx to 0
*
*/
Expand All @@ -312,7 +312,7 @@ public static function bit_test_reset() // Clear bit (ah) test flag
}

/**
* @method bit_test_comp search thru arbitry $ecx for the $ahth bit
* @method bit_test_comp search through arbitrary $ecx for the $ahth bit
* and set $CF to it's returned value and ecx[$ah] to 1
*
*/
Expand Down Expand Up @@ -874,7 +874,7 @@ public static function stack_cmov_ne()
}

/**
* @method fcomp substracts the $ST0 stack pointer
* @method fcomp subtracts the $ST0 stack pointer
* from $ah and pops its last value off
*
*/
Expand Down Expand Up @@ -915,7 +915,7 @@ public static function cosine() // change top of stack to cosine of top of st
}

/**
* @method stack_pnt_rev goes thru the stack backward,
* @method stack_pnt_rev goes through the stack backward,
* in reverse, and sets the $sp variable to its position
*
*/
Expand Down Expand Up @@ -1059,15 +1059,15 @@ public static function restore(string $filename)
PASM::$chain[] = $method_del[1];
if (!file_exists($filename)) {
return false;
}
}
PASM::$stack = (unserialize(file_get_contents($filename)));
return new static;
}

/**
* @method stack_load uses $key so it's indexable by string coefficient
* 'fc' so you can have the count of the reference rather than
* name it everytime
* name it every time
*
*/
public static function stack_load() // stack with count on stack
Expand All @@ -1090,7 +1090,7 @@ public static function stack_load() // stack with count on stack
public static function stack_mrg() // stack with count on stack
{
PASM::setup_chain(__METHOD__);

array_merge(PASM::$stack, PASM::$array);
PASM::$ecx = null;
PASM::$ST0 = PASM::$stack[array_key_last(PASM::$stack)];
Expand Down Expand Up @@ -1220,7 +1220,7 @@ public static function subea() // like subtract but backwards
}

/**
* @method subae substracts $ecx from $ah
* @method subae subtracts $ecx from $ah
* and puts the value in $rdx
*
*/
Expand Down Expand Up @@ -1770,7 +1770,7 @@ public static function fxam() // get decimal value, without integer
* @method fxch exchange values from one stack place to another (the top)
*
*/
public static function fxch() //
public static function fxch() //
{
PASM::setup_chain(__METHOD__);

Expand Down Expand Up @@ -1955,7 +1955,7 @@ public static function cmul() // $ah * $ecx
* @method in $string is server, collects in $buffer
*
*/
public static function in() //
public static function in() //
{
PASM::setup_chain(__METHOD__);

Expand Down Expand Up @@ -2216,7 +2216,7 @@ public static function ja() // from here down to next letter, is jmp commands
* @method jae jump while $ah >= $ecx
*
*/
public static function jae()
public static function jae()
{
PASM::setup_chain(__METHOD__);

Expand Down Expand Up @@ -3032,7 +3032,7 @@ public static function load_all_flags() // load all flags to $ah
}

/**
* @method end
* @method end
* reset chains
*
*/
Expand All @@ -3045,7 +3045,7 @@ public static function end()
}

/**
* @method quit
* @method quit
* exits the program
*
*/
Expand All @@ -3057,7 +3057,7 @@ public static function quit() // exit program
}

/**
* @method ea
* @method ea
* move $ecx to $ah
*
*/
Expand Down Expand Up @@ -3105,10 +3105,10 @@ public static function load_str($str = "") // mov ecx to $string

/**
* @method coast
* Go thru rest of commands after $ldp drop
* Go through rest of commands after $ldp drop
*
*/
public static function coast() // the secret sauce. Go thru rest of commands after $ldp drop
public static function coast() // the secret sauce. Go through rest of commands after $ldp drop
{
$counted = 0;
$count = count(PASM::$chain);
Expand Down Expand Up @@ -3430,7 +3430,7 @@ public static function not() // performs a not on $ah ad ecx
* @method or performs a not on $ah and $ecx
*
*/
public static function or() // performs a or on ecx and ah
public static function or() // performs an or on ecx and ah
{
PASM::setup_chain(__METHOD__);
if (PASM::$ecx or PASM::$ah) {
Expand Down Expand Up @@ -4075,7 +4075,7 @@ public static function setbe()
}

/**
* @method setc set rd to ah if CF == 1
* @method setc set rd to ah if CF == 1
*
*/
public static function setc()
Expand Down Expand Up @@ -4869,7 +4869,7 @@ public static function xadd() // ah = $ah + ecx && rdx = ah
}

/**
* @method xch move ecx to ah annd vice versa
* @method xch move ecx to ah and vice versa
*
*/
public static function xch() // reverse ecx and ah
Expand Down
Loading
Loading