[BLACKBOX] Ofront supporting for unsigned types

From: Oleg N. Cher <"Oleg>
Date: Wed, 25 Apr 2012 21:29:14 +0300

----boundary-LibPST-iamunique-1794593155_-_-
Content-type: text/plain

Dear Norayr,

You wrote in your nmos6502-oo2c's README:

"this work is based on the Stewart Greenhill's port of oo2c for avr
microcontrollers
He prepared patches for oo2c to produce c code for 8 bit machines, and a
small mini library."

What is sort of this patch? Is there a possibility to use unsigned data
types?

Mr. Josef Templ wrote me: "As far as I know, there is no simple way to
support new types without significantly extending the compiler incl. the
symbol file format and the code generator. This may get messy."

And he is absolutely right. I'm in doubts about the hidden problems of
addition of the unsigned types. This concept as is already generates
many of questions. Let to mix signed and unsigned types (as in C) or
disallow (as in Modula-2)? What to do with casting the types? Must be
only in-SYSTEM solution for the casting, or end-user? I am afraid
that this will be not improvement, but a hack. And I'm interested
in looking of available decisions of the similar problem.

You certainly know that for such weak CPU as 6502 (or Z80) unsigned
arithmetic is not luxury, but absolute necessary. Every C developers
says me: "For loop with counter from 0 to 255 I've used in C one-byte
variable, and you in Oberon must use two-byte. Oberon is bad and ugly".
Especially this possibly is need for two-byte comparsions and some
other arithmetic operations.

Maximum what I understand for unsigned types are only one thing:
unsigned types must be moved to pseudo-module SYSTEM.
Maybe for begin add unsigned types as aliases of signed types?

Is unsigned really need in Ofront for developing for 6502 CPU?
What do you say?


-- 
Oleg N. Cher
http://zx.oberon2.ru/
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1794593155_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xm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IHBvc3NpYmx5IGlzIG5lZWQg
Zm9yIHR3by1ieXRlIGNvbXBhcnNpb25zIGFuZCBzb21lXHBhcg0Kb3RoZXIgYXJpdGhtZXRpYyBv
cGVyYXRpb25zLlxwYXINClxwYXINCk1heGltdW0gd2hhdCBJIHVuZGVyc3RhbmQgZm9yIHVuc2ln
bmVkIHR5cGVzIGFyZSBvbmx5IG9uZSB0aGluZzpccGFyDQp1bnNpZ25lZCB0eXBlcyBtdXN0IGJl
IG1vdmVkIHRvIHBzZXVkby1tb2R1bGUgU1lTVEVNLlxwYXINCk1heWJlIGZvciBiZWdpbiBhZGQg
dW5zaWduZWQgdHlwZXMgYXMgYWxpYXNlcyBvZiBzaWduZWQgdHlwZXM/XHBhcg0KXHBhcg0KSXMg
dW5zaWduZWQgcmVhbGx5IG5lZWQgaW4gT2Zyb250IGZvciBkZXZlbG9waW5nIGZvciA2NTAyIENQ
VT9ccGFyDQpXaGF0IGRvIHlvdSBzYXk/XHBhcg0KXHBhcg0KXHBhcg0KLS0gXHBhcg0KT2xlZyBO
LiBDaGVyXHBhcg0KaHR0cDovL3p4Lm9iZXJvbjIucnUvXHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxw
YXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2FnZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxB
Q0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5DSH19AGkAAAA=
----boundary-LibPST-iamunique-1794593155_-_---
Received on Wed Apr 25 2012 - 20:29:14 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:04 UTC