Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 23:11 21 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : The MMBasic API : www.mmbasic.org

     Page 2 of 2    
Author Message
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 03:30am 05 Aug 2015
Copy link to clipboard 
Print this post

@piclover C'est trop chaud ici ! U must be the same age as me ! I first wrote 6800 assembler 39 years ago during my 2nd year at university on a Motorola D2 and then spent 10 very happy years writing 6800/6809/6502/68000 assembler for embedded process control systems including writing a Real Time OS for the 6809 and a PLC language. Then I was lured away by the lure of money and went to work in Investment Banking ! And now I'm back to what I like doing most, making things ! (mon français est très rouillée) or have I made an incorrect assumption

@matherp Thanks for the report about <<, I just tried doing << on a 64 bit long long and it didn't crash and seemed to work for me
long long longlongdivide(long long *a, long long *b){

int c;

c = (int) *a / (int) *b;

*a=*a << 1;

return (long long)c;

}


I must be doing something different from you or I've misunderstood something.

Right, back to the coding bench

Peter
The only Konstant is Change
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10281
Posted: 03:45am 05 Aug 2015
Copy link to clipboard 
Print this post

  Quote  I must be doing something different from you or I've misunderstood something.


Peter

I haven't tried it recently but last time I did it didn't crash but the shift doesn't pass the word boundary. i.e. it acts as though just a long.

The workaround was to set up a union over the long long and shift the two longs separately and deal with the carry at bit 16.

I can't remember whether signed/unsigned made any difference but if some 64-bit arithmetic calcs are calling non-position-independent library functions then I guess anything could happen.Edited by matherp 2015-08-06
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 04:15am 05 Aug 2015
Copy link to clipboard 
Print this post

  G8JCF said  writing 6800/6809/6502/68000 assembler for embedded process control systems including writing a Real Time OS for the 6809 and a PLC language.


No wonder we think alike, I thought I was reading my own CV for a second :)
You were not perhaps with Leeds & Northrop? That is where I was doing all of the above.

I defected into PC's when the first IBM's hit our shores and lots of people needed help getting them to talk to mainframes.

30 years later and I am back to playing with Microprocessors at last :)

Cheers
Chris

p.s. The last PLC I wrote, and my first real PIC project, was for the PIC16F690.
A choice based on the Name, being similar to MC6809, rather than the Peripherals, I was just starting to get my feet wet and was spoiled for choice. :)Edited by Chris Roper 2015-08-06
http://caroper.blogspot.com/
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 04:43am 05 Aug 2015
Copy link to clipboard 
Print this post

Hi Chris

I started working for Setpoint which made weighing and length measuring systems for Steel works, eg weighing 100 ton boats of molten steel, and pharmaceuticals, eg weighing to 5 grams in 15 Kg (pure penicillin is very very expensive stuff), then Davy Mckee - again steel works, then Thorn EMI - Fire/Security/Building Management/HVAC, but my first job in electronics was when I was a student and I worked as a test engineer during the summer holidays for a company called TUAC which made 100W and up audio power amplifiers for bands back in the early 70s.

BTW, I never got on with Z80/8080 assembler, really mucky stuff IMHO, the Motorola instruction set was much tidier I always felt. These days of course with optimising compilers and bags of memory it doesn't matter, almost nobody writes serious of assembler by hand anymore.

Happy days !!

Peter
The only Konstant is Change
 
G8JCF

Guru

Joined: 15/05/2014
Location: United Kingdom
Posts: 676
Posted: 04:49am 05 Aug 2015
Copy link to clipboard 
Print this post

Hi Peter

Understand about the word boundary, yes that is quite probable, I'll try with a 56 bit integer and see what happens.

When I get the time, I must try this stuff out on the ARM version of MM+CFunctions and see how that behaves

Peter
The only Konstant is Change
 
Justplayin

Guru

Joined: 31/01/2014
Location: United States
Posts: 328
Posted: 07:32am 05 Aug 2015
Copy link to clipboard 
Print this post

  G8JCF said  BTW, I never got on with Z80/8080 assembler, really mucky stuff IMHO, the Motorola instruction set was much tidier I always felt. These days of course with optimising compilers and bags of memory it doesn't matter, almost nobody writes serious of assembler by hand anymore.


I learned 8080 machine language, and thought the Motorla stuff was all mucked up!
Last time I did any assembly language programming was in the early '90s.

--Curtis


I am not a Mad Scientist...  It makes me happy inventing new ways to take over the world!!
 
piclover
Senior Member

Joined: 14/06/2015
Location: France
Posts: 134
Posted: 08:35am 05 Aug 2015
Copy link to clipboard 
Print this post

  G8JCF said  @piclover C'est trop chaud ici ! U must be the same age as me ! I first wrote 6800 assembler 39 years ago during my 2nd year at university[/quote]
I'm a few years younger than you then; I was still in school, just before high school, when I made my first "computer" (MC6800, 1Kb SRAM, 2Kb EPROM, 1 ACIA, 2 PIAs, 1 PTM, 1 20 keys "keyboard", 6*7-segments LED "display", all assembled in "wire wrapping"... Great fun ! ).

[quote]on a Motorola D2 and then spent 10 very happy years writing 6800/6809/6502/68000 assembler for embedded process control systems including writing a Real Time OS for the 6809 and a PLC language.[/quote]
Hehe. Pretty similar programming experience on CPUs, then (6800, 6502, Z80A, 680x0: I really love the 680x0 assembler and architecture... Too bad IBM chose Intel for the IBM PC...).Edited by piclover 2015-08-06
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 09:50am 05 Aug 2015
Copy link to clipboard 
Print this post

An interesting anecdote, which all these years later I am sure (or hope) the Non Disclosure Clause has expired on.

I used to have in my desk draw a set of two Boards that I was testing for IBM. They Plugged into the Bus of an XT PC, supposedly to turn the XT into an IBM terminal.

As each board contained a Motorola 68000 and the two boards worked in tandem, it seamed to be overkill for a dumb terminal. In reality the 68000's contained Microcode that ran the IBM 360 instruction code natively, off loading execution from the mainframe and setting up a local copy of VMS and CICS.

IBM's intention was to reduce network load but once it hit home that it would obviate the need for upgrades to mainframes, if applications could be offloaded, and result in the eventual demise of Mainframe computers, the plug was pulled on the project.

It was many years before IBM used the 68000 again, outside of their network gear, but it was used in the first RISK PC IIRC.

But IBM and Motorola had a lot more in common.

The first time I had to actually program a mainframe I scorned the library full of Reference manuals and dug out an instruction set reference card. It was remarkably similar to the 68000 instruction set, so much so that my assembler code ran first time. Understandably the CICS and COBOL programmers looked on in horror that a PC guy could code their Mainframe in Assembler on the first try.

That was the sacred domain of Senior Systems Programmers.

Sorry Peter, I think we derailed your thread :)




Edited by Chris Roper 2015-08-06
http://caroper.blogspot.com/
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5119
Posted: 11:58am 05 Aug 2015
Copy link to clipboard 
Print this post

Be nice people.
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
     Page 2 of 2    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025