1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-27 04:49:27 +00:00

Changed RADIX enum values.

This commit is contained in:
Jesper Gravgaard 2019-07-17 23:46:07 +02:00
parent 31ede3c794
commit 9e66c01b6c
11 changed files with 64 additions and 67 deletions

View File

@ -52,7 +52,7 @@ unsigned int* bsearch16u(unsigned int key, unsigned int* items, char num) {
} }
// The different supported radix // The different supported radix
enum RADIX { BINARY, OCTAL, DECIMAL, HEXADECIMAL }; enum RADIX { BINARY=2, OCTAL=8, DECIMAL=10, HEXADECIMAL=16 };
// Awaits fix https://gitlab.com/camelot/kickc/issues/230 // Awaits fix https://gitlab.com/camelot/kickc/issues/230
// Information about a radix // Information about a radix
@ -80,10 +80,6 @@ unsigned int[] RADIX_HEXADECIMAL_VALUES = { 0x1000, 0x100, 0x10 };
// Information about the hexadecimal radix // Information about the hexadecimal radix
// struct RadixInfo RADIXINFO_HEXADECIMAL = { 4, RADIX_HEXADECIMAL_VALUES }; // struct RadixInfo RADIXINFO_HEXADECIMAL = { 4, RADIX_HEXADECIMAL_VALUES };
// Awaits fix https://gitlab.com/camelot/kickc/issues/223
// Information about each radix. Can be retrieved using RADIXINFOS[radix]
// struct RadixInfo[] RADIXINFOS = { RADIXINFO_OCTAL, RADIXINFO_OCTAL, RADIXINFO_DECIMAL, RADIXINFO_HEXADECIMAL };
// The digits used for numbers // The digits used for numbers
char[] DIGITS = "0123456789abcdef"z; char[] DIGITS = "0123456789abcdef"z;
@ -114,8 +110,9 @@ void utoa(unsigned int value, char* buffer, enum RADIX radix){
digit_values = RADIX_BINARY_VALUES; digit_values = RADIX_BINARY_VALUES;
} else { } else {
// Unknown radix // Unknown radix
*buffer++ = 'n'; *buffer++ = 'e';
*buffer++ = 'a'; *buffer++ = 'r';
*buffer++ = 'r';
*buffer = 0; *buffer = 0;
return; return;
} }

View File

@ -1395,10 +1395,10 @@ SYMBOL TABLE SSA
(word) ProcessingSprite::vy (word) ProcessingSprite::vy
(word) ProcessingSprite::x (word) ProcessingSprite::x
(word) ProcessingSprite::y (word) ProcessingSprite::y
(const byte) RADIX::BINARY = (byte) 0 (const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (byte) 1 (const byte) RADIX::OCTAL = (number) 8
(byte*) RASTER (byte*) RASTER
(byte*) RASTER#0 (byte*) RASTER#0
(byte) RASTER_IRQ_MIDDLE (byte) RASTER_IRQ_MIDDLE
@ -10633,10 +10633,10 @@ FINAL SYMBOL TABLE
(word) ProcessingSprite::vy (word) ProcessingSprite::vy
(word) ProcessingSprite::x (word) ProcessingSprite::x
(word) ProcessingSprite::y (word) ProcessingSprite::y
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) RASTER (byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266 (const byte*) RASTER#0 RASTER = (byte*) 53266
(byte) RASTER_IRQ_MIDDLE (byte) RASTER_IRQ_MIDDLE

View File

@ -78,10 +78,10 @@
(word) ProcessingSprite::vy (word) ProcessingSprite::vy
(word) ProcessingSprite::x (word) ProcessingSprite::x
(word) ProcessingSprite::y (word) ProcessingSprite::y
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) RASTER (byte*) RASTER
(const byte*) RASTER#0 RASTER = (byte*) 53266 (const byte*) RASTER#0 RASTER = (byte*) 53266
(byte) RASTER_IRQ_MIDDLE (byte) RASTER_IRQ_MIDDLE

View File

@ -89,10 +89,10 @@ SYMBOL TABLE SSA
(byte*) BYTES#3 (byte*) BYTES#3
(byte*) HEAP_TOP (byte*) HEAP_TOP
(byte*) HEAP_TOP#0 (byte*) HEAP_TOP#0
(const byte) RADIX::BINARY = (byte) 0 (const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (byte) 1 (const byte) RADIX::OCTAL = (number) 8
(byte*) heap_head (byte*) heap_head
(byte*) heap_head#0 (byte*) heap_head#0
(byte*) heap_head#1 (byte*) heap_head#1
@ -484,10 +484,10 @@ FINAL SYMBOL TABLE
(const byte*) BYTES#0 BYTES = (byte*)(const void*) malloc::return#0 (const byte*) BYTES#0 BYTES = (byte*)(const void*) malloc::return#0
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) heap_head (byte*) heap_head
(void()) main() (void()) main()
(label) main::@1 (label) main::@1

View File

@ -6,10 +6,10 @@
(const byte*) BYTES#0 BYTES = (byte*)(const void*) malloc::return#0 (const byte*) BYTES#0 BYTES = (byte*)(const void*) malloc::return#0
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) heap_head (byte*) heap_head
(void()) main() (void()) main()
(label) main::@1 (label) main::@1

View File

@ -87,10 +87,10 @@ SYMBOL TABLE SSA
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(byte*) HEAP_TOP#0 (byte*) HEAP_TOP#0
(const byte) RADIX::BINARY = (byte) 0 (const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (byte) 1 (const byte) RADIX::OCTAL = (number) 8
(const byte) SIZEOF_WORD = (byte) 2 (const byte) SIZEOF_WORD = (byte) 2
(word*) WORDS (word*) WORDS
(word*) WORDS#0 (word*) WORDS#0
@ -546,10 +546,10 @@ FINAL SYMBOL TABLE
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(word*) WORDS (word*) WORDS
(const word*) WORDS#0 WORDS = (word*)(const void*) malloc::return#0 (const word*) WORDS#0 WORDS = (word*)(const void*) malloc::return#0

View File

@ -4,10 +4,10 @@
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2 (const byte) SIZEOF_WORD SIZEOF_WORD = (byte) 2
(word*) WORDS (word*) WORDS
(const word*) WORDS#0 WORDS = (word*)(const void*) malloc::return#0 (const word*) WORDS#0 WORDS = (word*)(const void*) malloc::return#0

View File

@ -125,10 +125,10 @@ SYMBOL TABLE SSA
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(byte*) HEAP_TOP#0 (byte*) HEAP_TOP#0
(const byte) RADIX::BINARY = (byte) 0 (const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (byte) 1 (const byte) RADIX::OCTAL = (number) 8
(void()) free((void*) free::ptr) (void()) free((void*) free::ptr)
(label) free::@return (label) free::@return
(void*) free::ptr (void*) free::ptr
@ -849,10 +849,10 @@ FINAL SYMBOL TABLE
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(void()) free((void*) free::ptr) (void()) free((void*) free::ptr)
(label) free::@return (label) free::@return
(void*) free::ptr (void*) free::ptr

View File

@ -3,10 +3,10 @@
(label) @end (label) @end
(byte*) HEAP_TOP (byte*) HEAP_TOP
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(void()) free((void*) free::ptr) (void()) free((void*) free::ptr)
(label) free::@return (label) free::@return
(void*) free::ptr (void*) free::ptr

View File

@ -1480,10 +1480,10 @@ SYMBOL TABLE SSA
(byte) NUM_SQUARES#7 (byte) NUM_SQUARES#7
(byte) NUM_SQUARES#8 (byte) NUM_SQUARES#8
(byte) NUM_SQUARES#9 (byte) NUM_SQUARES#9
(const byte) RADIX::BINARY = (byte) 0 (const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (byte) 1 (const byte) RADIX::OCTAL = (number) 8
(byte*) SCREEN1 (byte*) SCREEN1
(byte*) SCREEN1#0 (byte*) SCREEN1#0
(byte*) SCREEN2 (byte*) SCREEN2
@ -9741,10 +9741,10 @@ FINAL SYMBOL TABLE
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(byte) NUM_SQUARES (byte) NUM_SQUARES
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30 (const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) SCREEN1 (byte*) SCREEN1
(const byte*) SCREEN1#0 SCREEN1 = (byte*) 10240 (const byte*) SCREEN1#0 SCREEN1 = (byte*) 10240
(byte*) SCREEN2 (byte*) SCREEN2

View File

@ -22,10 +22,10 @@
(const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960 (const byte*) HEAP_TOP#0 HEAP_TOP = (byte*) 40960
(byte) NUM_SQUARES (byte) NUM_SQUARES
(const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30 (const byte) NUM_SQUARES#3 NUM_SQUARES = (byte) $30
(const byte) RADIX::BINARY BINARY = (byte) 0 (const byte) RADIX::BINARY BINARY = (number) 2
(const byte) RADIX::DECIMAL DECIMAL = (byte) 2 (const byte) RADIX::DECIMAL DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL HEXADECIMAL = (byte) 3 (const byte) RADIX::HEXADECIMAL HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL OCTAL = (byte) 1 (const byte) RADIX::OCTAL OCTAL = (number) 8
(byte*) SCREEN1 (byte*) SCREEN1
(const byte*) SCREEN1#0 SCREEN1 = (byte*) 10240 (const byte*) SCREEN1#0 SCREEN1 = (byte*) 10240
(byte*) SCREEN2 (byte*) SCREEN2