mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-25 06:31:25 +00:00
Deleted conds.c02 and forforpf.02 from py65/
This commit is contained in:
parent
be2b2ec835
commit
251c5edb8b
@ -1,57 +0,0 @@
|
|||||||
/****************************************
|
|
||||||
* CONDS - Test Conditional Expressions *
|
|
||||||
****************************************/
|
|
||||||
|
|
||||||
#include <py65.h02>
|
|
||||||
#include <stdio.h02>
|
|
||||||
#include <stdlib.h02>
|
|
||||||
|
|
||||||
char passed = " Passed. ";
|
|
||||||
char failed = " Failed. ";
|
|
||||||
|
|
||||||
main:
|
|
||||||
puts("1==1 "); if (1==1) puts(&passed); else puts(&failed);
|
|
||||||
puts("1==2 "); if (1==2) puts(&failed); else puts(&passed);
|
|
||||||
puts("1+1=2"); if (1+1 == 2) puts(&passed); else puts(&failed);
|
|
||||||
puts("1<>2 "); if (1<>2) puts(&passed); else puts(&failed);
|
|
||||||
puts("1<>1 "); if (1<>1) putln(&failed); else putln(&passed);
|
|
||||||
|
|
||||||
puts("1<2 "); if (1<2) puts(&passed); else puts(&failed);
|
|
||||||
puts("2<1 "); if (2<1) puts(&failed); else puts(&passed);
|
|
||||||
puts("1<1 "); if (1<1) putln(&failed); else putln(&passed);
|
|
||||||
|
|
||||||
puts("1<=2 "); if (1<=2) puts(&passed); else puts(&failed);
|
|
||||||
puts("2<=1 "); if (2<=1) puts(&failed); else puts(&passed);
|
|
||||||
puts("1<=1 "); if (1<=1) putln(&passed); else putln(&failed);
|
|
||||||
|
|
||||||
puts("2>1 "); if (2>1) puts(&passed); else puts(&failed);
|
|
||||||
puts("1>2 "); if (1>2) puts(&failed); else puts(&passed);
|
|
||||||
puts("1>1 "); if (1>1) putln(&failed); else putln(&passed);
|
|
||||||
|
|
||||||
puts("2>=1 "); if (2>=1) puts(&passed); else puts(&failed);
|
|
||||||
puts("1>=2 "); if (1>=2) puts(&failed); else puts(&passed);
|
|
||||||
puts("1>=1 "); if (1>=1) putln(&passed); else putln(&failed);
|
|
||||||
|
|
||||||
puts("$FF "); if ($FF) puts(&passed); else puts(&failed);
|
|
||||||
puts("$00 "); if ($00) puts(&failed); else puts(&passed);
|
|
||||||
puts("1|0 "); if (1|0) puts(&passed); else puts(&failed);
|
|
||||||
puts("1&0 "); if (1&0) puts(&failed); else puts(&passed);
|
|
||||||
puts("1^1 "); if (1^1) putln(&failed); else putln(&passed);
|
|
||||||
|
|
||||||
puts("!$FF "); if (!$FF) puts(&failed); else puts(&passed);
|
|
||||||
puts("!$00 "); if (!$00) puts(&passed); else puts(&failed);
|
|
||||||
puts("!1|0 "); if (!1|0) puts(&failed); else puts(&passed);
|
|
||||||
puts("!1&0 "); if (!1&0) puts(&passed); else puts(&failed);
|
|
||||||
puts("!1^1 "); if (!1^1) putln(&passed); else putln(&failed);
|
|
||||||
|
|
||||||
puts("$FF:+"); if ($FF:+) puts(&failed); else puts(&passed);
|
|
||||||
puts("$FF:-"); if ($FF:-) puts(&passed); else puts(&failed);
|
|
||||||
puts("$00:+"); if ($00:+) puts(&passed); else puts(&failed);
|
|
||||||
puts("$00:-"); if ($00:-) puts(&failed); else puts(&passed);
|
|
||||||
puts("!0:+ "); if (!0:+) putln(&failed); else putln(&passed);
|
|
||||||
|
|
||||||
puts("atoc(\"0\")"); if (atoc("0")) puts(&failed); else puts(&passed);
|
|
||||||
puts("atoc(\"1\")"); if (atoc("1")) puts(&passed); else puts(&failed);
|
|
||||||
puts("atoc(\"128\"):-"); if (atoc("128"):-) putln(&passed); else putln(&failed);
|
|
||||||
|
|
||||||
goto exit;
|
|
@ -1,21 +0,0 @@
|
|||||||
/******************************************
|
|
||||||
* FORFORPF - Test Nested FOR with PRINTF *
|
|
||||||
******************************************/
|
|
||||||
|
|
||||||
#include <py65.h02>
|
|
||||||
#include <stdlib.h02>
|
|
||||||
#include <stdio.h02>
|
|
||||||
#include <stdiox.h02>
|
|
||||||
|
|
||||||
char i,j,result;
|
|
||||||
main:
|
|
||||||
for (i=0;i<5;i++)
|
|
||||||
{
|
|
||||||
for (j=0;j<5;j++)
|
|
||||||
{
|
|
||||||
result=div(mult(mult(i,5)+j,3),5)+32; //(i*5+j)*3/5+32;
|
|
||||||
printf(result,"%d");
|
|
||||||
newlin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
goto exit;
|
|
Loading…
Reference in New Issue
Block a user