![]() |
Forum Index : Microcontroller and PC projects : The MMBasic API : www.mmbasic.org
![]() ![]() |
|||||
Author | Message | ||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
@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 KingdomPosts: 10281 |
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. |
||||
Chris Roper Senior Member ![]() Joined: 19/05/2015 Location: South AfricaPosts: 280 |
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. :) http://caroper.blogspot.com/ |
||||
G8JCF![]() Guru ![]() Joined: 15/05/2014 Location: United KingdomPosts: 676 |
Hi Chris ![]() 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 KingdomPosts: 676 |
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 StatesPosts: 328 |
I learned 8080 machine language, and thought the Motorla stuff was all mucked up! ![]() --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: FrancePosts: 134 |
|
||||
Chris Roper Senior Member ![]() Joined: 19/05/2015 Location: South AfricaPosts: 280 |
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 :) http://caroper.blogspot.com/ |
||||
Gizmo![]() Admin Group ![]() Joined: 05/06/2004 Location: AustraliaPosts: 5119 |
Be nice people. The best time to plant a tree was twenty years ago, the second best time is right now. JAQ |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |