68000

68000 Assembly Language - CMPI.B

柔情痞子 提交于 2019-12-04 05:45:25
问题 What are the contents of the CCR and D3 after the following instructions sequence executes? Perform the calculation by hand and show your work. MOVE.B #7,D3 CMPI.B #11,D3 I know the contents of the D3 register will remain unchanged by i am unsure of how to do the calculation to get the ccr flags. Could somone please show me the calculation how you did it and what flags are set off and why. I really have a hard time understanding this. 回答1: D3 will be unchanged by the CMPI , but of course its

Help with 68k assembly - jump tables?

可紊 提交于 2019-12-04 00:31:56
I'm working on reverse engineering a large Amiga program in IDA, and I've made a ton of progress. However, there is some stuff I can't quite figure out. Namely, I have found several subroutines which use what I believe to be "jump tables" - but I can't quite figure out how they work. Does anyone have any advice? moveq #0,d0 move.b d7,d0 ; set D0 to a byte from CTRL subq.w #1,d0 ; subtract 1 from it blt.w finish_29ABA ; if D0 is less than 1, branch cmpi.w #$16,d0 bge.w finish_29ABA ; if D0 is greater than or equal to 16, branch add.w d0,d0 ; otherwise, double D0 move.w dword_29918(pc,d0.w),d0

68000 Assembly Language - CMPI.B

╄→尐↘猪︶ㄣ 提交于 2019-12-02 11:54:55
What are the contents of the CCR and D3 after the following instructions sequence executes? Perform the calculation by hand and show your work. MOVE.B #7,D3 CMPI.B #11,D3 I know the contents of the D3 register will remain unchanged by i am unsure of how to do the calculation to get the ccr flags. Could somone please show me the calculation how you did it and what flags are set off and why. I really have a hard time understanding this. D3 will be unchanged by the CMPI , but of course its low byte will be 7 due to the MOVE . (Thanks to @unwind for pointing this out.) The instruction set

Assembly Random Number within Range using Easy 68K (68000)

断了今生、忘了曾经 提交于 2019-12-02 01:30:58
I'm creating a simple black jack game using the Easy 68K simulator and need to use a random number to assign the cards. My cards must be in the range 2 to 11. I seem to be getting the same number every time, and it isn't within the range I expect. My card value needs to end up in D3, so I have the following random number code: CLR.L D0 CLR.L D3 MOVE.B #8, D0 ;Access time TRAP #15 AND.L #$5FFFFF,D1 ;prevent overflow in divu DIVU #10, D1 SWAP D1 ADDQ.W #1, D1 MOVE D1, D3 which I came to by modifying the code on this site: https://notendur.hi.is/voe1/3.%20onn/Tolvuhogun/EASy68K/Examples/tutorial3

68k Assembler on OS X Lion

天涯浪子 提交于 2019-12-01 06:06:52
I need to do some programming stuff in assembler for the 68k for my college class. I'm looking for a programm to do it on os x lion. I found easy68k which is running in wine, but I have the feeling that it's not working porperly. Any guess? Vasm is an assembler that can be built to target the 68k and works under OS X. Check the compilation notes, but basically the command to build it from source to target the 68k, using motorola syntax is: make CPU=m68k SYNTAX=mot I'm in the same situation, and I've found that Easy68k ( http://www.easy68k.com/ ) works very well under wine. Also, it is possible

68k Assembler on OS X Lion

偶尔善良 提交于 2019-12-01 04:12:04
问题 I need to do some programming stuff in assembler for the 68k for my college class. I'm looking for a programm to do it on os x lion. I found easy68k which is running in wine, but I have the feeling that it's not working porperly. Any guess? 回答1: Vasm is an assembler that can be built to target the 68k and works under OS X. Check the compilation notes, but basically the command to build it from source to target the 68k, using motorola syntax is: make CPU=m68k SYNTAX=mot 回答2: I'm in the same

Writing an OS for Motorola 68K processor. Can I emulate it? And can I test-drive OS development?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 19:01:51
Next term, I'll need to write a basic operating system for Motorola 68K processor as part of a course lab material. Is there a Linux emulator of a basic hardware setup with that processor? So my partners and I can debug quicker on our computers instead of physically restarting the board and stuff. Is it possible to apply test-driven development technique to OS development? Code will be mostly assembly and C. What will be the main difficulties with trying to test-drive this? Any advice on how to do it? You certainly can tdd this project. First off decouple all accesses to the hardware with