1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-17 16:29:32 +00:00
This commit is contained in:
mrdudz 2023-08-29 03:15:54 +02:00
parent 109b770236
commit 3164917f46
18 changed files with 5 additions and 21 deletions

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>
@ -67,9 +66,9 @@ void varconst(void)
printf(" fp3:0x%08lx [0x42860000] %s (exp:67.0)", *((uint32_t*)&fp3), _ftostr(buf, fp3));
test1(fp3, "42860000");
/* substraction, variable - constant */
/* subtraction, variable - constant */
fp1 = 16.25f;
fp3 = fp1 - 8.5f; // FIXME: Invalid operands for binary operator '-'
fp3 = fp1 - 8.5f;
printf("substraction: %s-%s=%s\n", _ftostr(buf, fp1), _ftostr(buf2, 8.5f), _ftostr(buf3, fp3));
printf(" fp3:0x%08lx [0x40f80000] %s (exp:7.75)", *((uint32_t*)&fp3), _ftostr(buf, fp3));
test1(fp3, "40f80000");
@ -83,12 +82,14 @@ void varconst(void)
printf("fp3:0x%08lx [0xbe4cccce] %s (-0.2)", *((uint32_t*)&fp3), _ftostr(buf, fp3));
test1(fp3, "be4cccce");
/* multiplication, variable * constant */
fp1 = 16.25f;
fp3 = fp1 * 2.5f;
printf("multiplication: %s*%s=%s\n", _ftostr(buf, fp1), _ftostr(buf2, 2.3f), _ftostr(buf3, fp3));
printf(" fp3:0x%08lx [0x42228000] %s (exp:40.625)", *((uint32_t*)&fp3), _ftostr(buf, fp3));
test1(fp3, "42228000");
/* division, variable / constant */
fp1 = 32.5f;
fp3 = fp1 / 2.5f;
printf("division: %s/%s=%s\n", _ftostr(buf, fp1), _ftostr(buf2, 2.3f), _ftostr(buf3, fp3));

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>
@ -77,7 +76,7 @@ void intconstvar(void)
fp2 = 10.0f;
// Comparing types 'int' with 'float' is invalid
#if 0
#if 1
expect("10 == 20 is", 0, (10 == fp1));
expect("20 == 10 is", 0, (20 == fp2));
expect("20 == 20 is", 1, (20 == fp1));

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test comparison operations
// WIP WIP WIP
#include <stdlib.h>
#include <stdio.h>

View File

@ -1,6 +1,5 @@
// test basic type conversions
// WIP WIP WIP
#define TEST_8
#define TEST_16

View File

@ -1,6 +1,5 @@
// test basic type conversions
// WIP WIP WIP
#define TEST_8
#define TEST_16

View File

@ -1,6 +1,5 @@
// test basic type conversions
// WIP WIP WIP
#define TEST_8
#define TEST_16

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>

View File

@ -1,6 +1,5 @@
// test basic arithmetic operations
// WIP WIP WIP
#ifdef CONIO
#include <conio.h>