English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 05 September 2018, 21:30   #401
Megol
Registered User

Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 368
Quote:
Originally Posted by meynaf View Post
And you pretend it is PORTABLE C ? This kind of hack is everything but portable !
As it is indeed portable C I do claim that.

Quote:
And the registers ? How do you save/reload them in portable C ?
Registers are completely 100% dependent of cpu architecture !
At least try to have a basic level of knowledge before trying to discuss something. I already told you BTW.
Megol is offline  
Old 05 September 2018, 21:33   #402
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
Quote:
Originally Posted by Megol View Post
As it is indeed portable C I do claim that.
By definition hacks are not portable. Else they wouldn't be hacks.


Quote:
Originally Posted by Megol View Post
At least try to have a basic level of knowledge before trying to discuss something. I already told you BTW.
No you did not tell anything and your sentence is insulting (as usual ?).
meynaf is online now  
Old 05 September 2018, 21:52   #403
kamelito
Zone Friend
kamelito's Avatar
 
Join Date: May 2006
Location: France
Posts: 995
Quote:
Originally Posted by Bruce Abbott View Post
Soon there may be another choice. I am working on an interactive disassembler that - most of the time - does get it 100% right, and only needs a few mouse clicks to change the type when it is wrong.
Great news, please make it happens
kamelito is offline  
Old 05 September 2018, 22:06   #404
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 43
Posts: 3,086
That you can get all kinds of things to work with hacks is well known. Now the question is whether or not you can do an OS in portable C without any hacks and do it properly? I'm betting on no.
Thorham is offline  
Old 05 September 2018, 22:17   #405
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
realistically you get a C compiler to do the heavy lifting..

e.g. gcc

{
register int sp asm ("sp");
printf("%x", sp);
}

Now thats going work on any CPU which the gnu assembler calls the stack pointer "sp".... which i bet is a probably a lot of them. They often have an alias for it..

Now its absolutely not standard C89/C99 etc. but its portable on the same compiler family.

So split hairs about whether its real C etc. fine i dont care about that argument. i accept its not standard. And sure you get crapper/slower code etc. Compilers all do this different so you end up with hacks on a per compiler basis. But they all do this and you have hacks if you try and make portable assembler that works on all assemblers..
plasmab is offline  
Old 05 September 2018, 22:30   #406
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 43
Posts: 3,086
So it can be done but it's not very useful. Who made a point out of this anyway? There doesn't seem to be much of a point
Thorham is offline  
Old 05 September 2018, 22:34   #407
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by Thorham View Post
So it can be done but it's not very useful. Who made a point out of this anyway? There doesn't seem to be much of a point
Not I. I'm very bored now.

There is pretty much ways to do all the assembly marshalling you need for an OS in C but they are compiler family specific. Which is absolutely fine by me.

BTW: I compiled the above code on x86, ARM and 68K then i got bored.
plasmab is offline  
Old 05 September 2018, 22:42   #408
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 43
Posts: 3,086
Quote:
Originally Posted by plasmab View Post
There is pretty much ways to do all the assembly marshalling you need for an OS in C but they are compiler family specific. Which is absolutely fine by me.
I'm willing to bet that they don't do this in Linux and BSD. Best way seems to do it by hand.
Thorham is offline  
Old 05 September 2018, 22:48   #409
alpine9000
Registered User

 
Join Date: Mar 2016
Location: Australia
Posts: 726
I wrote a multi tasking OS in C, but yeah the context switches had to be asm. And a few other little things like atomic operations for locks etc.
alpine9000 is offline  
Old 05 September 2018, 22:58   #410
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by Thorham View Post
I'm willing to bet that they don't do this in Linux and BSD. Best way seems to do it by hand.
NetBSD is a bit purist this way... maybe there. but yes. its a bit stupid to try 100% C and its a bit stupid to do 100% ASM. Happy medium.

But its wrong to say you cant do this stuff at all because the compiler writers do help you out a lot.

Quote:
Originally Posted by alpine9000 View Post
I wrote a multi tasking OS in C, but yeah the context switches had to be asm. And a few other little things like atomic operations for locks etc.
Yes i cannot see how you do SMP locks in pure C (but happy for someone to point how to do it).

Anyways.. im so bored im going to watch Forrest Gump.
plasmab is offline  
Old 06 September 2018, 08:58   #411
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
Quote:
Originally Posted by plasmab View Post
{
register int sp asm ("sp");
printf("%x", sp);
}
Not at all my definition of "portable C". There is even the string "asm" in it
meynaf is online now  
Old 06 September 2018, 09:11   #412
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Quote:
Originally Posted by meynaf View Post
Not at all my definition of "portable C". There is even the string "asm" in it


You are entitled to that opinion. I knew would be your only way of defending the lack of knowledge you demonstrated here.

It’s portable on all GCC compliers. VBCC uses slightly different syntax. All you’re pointing out is that C989/C99 doesn’t have a defined standard for it. It’s possible that future standards will.

Like I say different assemblers use different syntax notation. There is no assembly standard so your argument is laughable
plasmab is offline  
Old 06 September 2018, 09:28   #413
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
Quote:
Originally Posted by plasmab View Post
You are entitled to that opinion. I knew would be your only way of defending the lack of knowledge you demonstrated here.
I'm not more entitled with my opinion than you with yours. And again you return against me your own lack of knowledge, because you are completely unable to counter any of my arguments.


Quote:
Originally Posted by plasmab View Post
It’s portable on all GCC compliers. VBCC uses slightly different syntax. All you’re pointing out is that C989/C99 doesn’t have a defined standard for it. It’s possible that future standards will.
Using disguised asm is doable on just about every compiler. It's still asm and not "portable C".
Now of course several folks here pretend an OS can be fully written in portable C and even has been, but where is the source code showing this ?


Quote:
Originally Posted by plasmab View Post
Like I say different assemblers use different syntax notation. There is no assembly standard so your argument is laughable
The asm syntax has absolutely nothing to do with my arguments here !
It's your above sentence that's laughable.


But anyway what was your point originally ? It was that the type of CPU does not matter. But as "portable" things require at least some amount of inefficient hack leading to code bloat, it's the proof that the CPU type actually *does* matter. Not wanting to be proven wrong, you attempted to redirect the discussion to something else. Nice try.
meynaf is online now  
Old 06 September 2018, 09:33   #414
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
68k details

You say I am unable to counter your argument? Ok you said you can’t make portable C that access registers. I posted a damn code example and you put your fingers in your ears and say “la la la.. I can’t hear!”

It’s actually now defined in the C11 spec.

No matter what anyone says you will argue the opposite.

And my point about the assembly was you have more hacks make an OS work on multiple assemblers on the same platform than multiple C compilers on different platforms. But that went to miles over your head. Really your level isn’t even worth engaging with anymore.
plasmab is offline  
Old 06 September 2018, 09:45   #415
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
Quote:
Originally Posted by plasmab View Post
You say I am unable to counter your argument? Ok you said you can’t make portable C that access registers. I posted a damn code example and you put your fingers in your ears and say “la la la.. I can’t hear!”

It’s actually now defined in the C11 spec.
Now try to access FPU, XMM, YMM registers in "portable" way. How can the access to something not existing on all machines be "portable" ?
You're doing cherry-picking here, just finding a small, useless example where it remotely appears to work. Pityful.


Quote:
Originally Posted by plasmab View Post
No matter what anyone says you will argue the opposite.
Try saying intelligent things.


Quote:
Originally Posted by plasmab View Post
And my point about the assembly was you have more hacks make an OS work on multiple assemblers on the same platform than multiple C compilers on different platforms.
Which you didn't say explicitly and is just wrong anyway.


Quote:
Originally Posted by plasmab View Post
But that went to miles over your head. Really your level isn’t even worth engaging with anymore.
Look up. Not down. Really your level is too low and i don't want to be bring down there.


I have disassembled megabytes of code, often compiled, and ported several games from one computer to another without even having the source code.
(Not only 68k, i did some 6502 too and would be doing x86 if it weren't so bad.)
Of course copy protection had to be removed in the process.
I have written whole utilities like picture viewer in 100% asm.
I am using my own disassembler, my own debugger.

And now it will be *my* lack of knowledge ?
Especially from people who apparently do mainly - if not only - hardware ?
This is very poor and very stupid.

I really wish i could find a suitable reply to such aggressive nonsense other than clicking "report post". Sigh.
(As it is obvious writing normal argumentation doesn't work.)
meynaf is online now  
Old 06 September 2018, 10:14   #416
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
68k details

For the sake of finishing this I will concede that I know nothing about computers. My bachelors degrees is electronics and my PhD in physics..

My issue is that you make sweeping statements that can be proven wrong very easily. Even by someone as stupid as me. You also have lied a couple of times here. Like when you claimed AmigaOS had the best interrupt latency.

You are getting upset because people are calling out your sweeping generalisation and lies. Maybe/probably you have some facts further down the line that are worth talking about but we never get to them because you are so imprecise and sweeping with what you say that people get stuck on those.

Finally when you fail with your arguments and get frustrated you are resorting to chest beating / “d$ck swinging” about your achievements.

Seriously, talk about this stuff objectively and with facts and you will get better engagement and the respect you probably deserve deep down. I tried to tell you this ~100 posts ago.
plasmab is offline  
Old 06 September 2018, 10:39   #417
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
Quote:
Originally Posted by plasmab View Post
My issue is that you make sweeping statements that can be proven wrong very easily. Even by someone as stupid as me.
So far nothing has been "proven wrong". So what are you waiting ? Just do it.
It's not me doing "sweeping statements". You're reversing the charge of the proof here. You can prove something exists by actually finding one and showing it. You can't objectively prove it doesn't exist.


Quote:
Originally Posted by plasmab View Post
You also have lied a couple of times here. Like when you claimed AmigaOS had the best interrupt latency.
And to the strawman fallacy you go again ! (And also to abusive generalization, by giving one example and saying there were others.)
I've never claimed AmigaOS had the best interrupt latency.
Just that it had the best context switching speed of the systems i tested some years in the past - and i don't pretend having tested them all, so far not.


Quote:
Originally Posted by plasmab View Post
You are getting upset because people are calling out your sweeping generalisation and lies. Maybe/probably you have some facts further down the line that are worth talking about but we never get to them because you are so imprecise and sweeping with what you say that people get stuck on those.
No I am getting upset because you keep on insulting me instead of just speaking about the subject.
The worse i concede is this : you assert things without proof and i dismiss them without proof.


Quote:
Originally Posted by plasmab View Post
Finally when you fail with your arguments and get frustrated you are resorting to chest beating / “d$ck swinging” about your achievements.
This was just to show how much your insults were ridiculous.


Quote:
Originally Posted by plasmab View Post
Seriously, talk about this stuff objectively and with facts and you will get better engagement and the respect you probably deserve deep down. I tried to tell you this ~100 posts ago.
Facts ? What facts ? Again, how can I prove something can not be done ???
This is impossible. The burden of the proof isn't on my side.
meynaf is online now  
Old 06 September 2018, 10:41   #418
meynaf
son of 68k
meynaf's Avatar
 
Join Date: Nov 2007
Location: Lyon / France
Age: 46
Posts: 3,537
So far i have seen :
- personal attacks
- strawman fallacy
- cherry picking
- reversing the burden of the proof
- abusive generalization

I wonder what will come next ?

EDIT:
Forgot this one :
- red herring
meynaf is online now  
Old 06 September 2018, 10:44   #419
plasmab
Banned
plasmab's Avatar
 
Join Date: Sep 2016
Location: UK
Posts: 2,917
Ok I’m done. It’s pointless talking to someone with their fingers in their ears.
plasmab is offline  
Old 06 September 2018, 10:56   #420
Megol
Registered User

Megol's Avatar
 
Join Date: May 2014
Location: inside the emulator
Posts: 368
Quote:
Originally Posted by meynaf View Post
So far i have seen :
- personal attacks
- strawman fallacy
- cherry picking
- reversing the burden of the proof
- abusive generalization

I wonder what will come next ?

EDIT:
Forgot this one :
- red herring
Yes I wonder what you will bring next. Pot kettle etc.
Megol is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any software to see technical OS details? necronom support.Other 3 02 April 2016 12:05
2-star rarity details? stet HOL suggestions and feedback 0 14 December 2015 05:24
EAB's FTP details... Basquemactee1 project.EAB File Server 2 30 October 2013 22:54
req details for sdl turrican3 request.Other 0 20 April 2008 22:06
Forum Details BippyM request.Other 0 15 May 2006 00:56

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 14:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.11906 seconds with 14 queries