All 680x0 related coding posts in this section please.
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
- 10 GOTO 10
- Posts: 1949
- Joined: Fri Oct 04, 2002 11:23 am
- Location: Warsaw, Poland
just for the record
Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
/ Steem SSE
- Captain Atari
- Posts: 362
- Joined: Mon Mar 03, 2008 10:33 pm
Very nice. I think the PDP11, 6800 and certainly the Z80 also have automatic sign extension in some instructions under certain circumstances. Is this emulated correctly in Steem\SainT and Hatari?
Still got, still working: Atari 4Mb STe, 520STFM, 2.5Mb STF.
Hardware: Cumana CSA 354, Ultimate Ripper, Blitz Turbo, Synchro Express II (US and UK Versions).
- Atari User
- Posts: 40
- Joined: Fri Mar 08, 2019 3:47 pm
It's likely, as the Programmer's Reference Manual is entirely explicit, directly in its description of MOVEM:
"In the case of a word transfer to either address or data registers, each word is sign-extended to 32 bits," (P4-128; P232 of the PDF
- Atari God
- Posts: 1196
- Joined: Sun Aug 03, 2014 5:54 pm
mlynn1974 wrote:Is this emulated correctly in Steem\SainT and Hatari?
Yes, this is nothing new, and emulated correctly in all emulators i know of, including Hatari and ARAnyM.
- Captain Atari
- Posts: 329
- Joined: Fri Mar 01, 2013 10:52 pm
I was about to say, movem.w sign extends by default.
- Hardware Guru
- Posts: 4012
- Joined: Sat May 29, 2004 7:52 pm
The 68000 never modifies just the low word of an address register. This is part of the 68K philosophy and probably well known. The MOVEM instruction is rather unique in that it doesn't distinguish between address or data register destinations. So the principle of sign extension is applied in either case. It would have complicated the microcode, probably significantly, otherwise.
Fx Cast: Atari St cycle accurate fpga core