Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Gotchas/68000-Assembly/gotchas-1.68000
Normal file
2
Task/Gotchas/68000-Assembly/gotchas-1.68000
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
MOVE.L $12345678,D0 ;move the 32-bit value stored at memory address $12345678 into D0
|
||||
MOVE.L #$12345678,D0 ;load the D0 register with the constant value $12345678
|
||||
1
Task/Gotchas/68000-Assembly/gotchas-2.68000
Normal file
1
Task/Gotchas/68000-Assembly/gotchas-2.68000
Normal file
|
|
@ -0,0 +1 @@
|
|||
DC.B $45 ;this is the literal constant value $45, not "the value stored at memory address 0x0045"
|
||||
4
Task/Gotchas/68000-Assembly/gotchas-3.68000
Normal file
4
Task/Gotchas/68000-Assembly/gotchas-3.68000
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
MOVEA.L #$A04000,A0 ;load the address $A04000 into A0
|
||||
MOVE.L A0,D0 ;move the quantity $A04000 into D0
|
||||
MOVE.B (A0),D0 ;get the 8-bit value stored at memory address $A04000, and store it into the lowest byte of D0.
|
||||
MOVE.W (4,A0),D1 ;get the 16-bit value stored at memory address $A04004, and store it into the low word of D1.
|
||||
2
Task/Gotchas/68000-Assembly/gotchas-4.68000
Normal file
2
Task/Gotchas/68000-Assembly/gotchas-4.68000
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
LEA $A04000,A0 ;effectively MOVEA.L #$A04000,A0
|
||||
LEA (4,A0),A0 ;effectively ADDA.L #4,A0
|
||||
6
Task/Gotchas/68000-Assembly/gotchas-5.68000
Normal file
6
Task/Gotchas/68000-Assembly/gotchas-5.68000
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
MOVE.L #$12345678,D0 ;set the entire register to a known value for demonstration purposes.
|
||||
|
||||
MOVE.W #$7FFF,D0 ;D0 = $12347FFF
|
||||
ADD.W #1,D0 ;D0 = $12348000
|
||||
TRAPV ;the above operation set the overflow flag, so this instruction will call the signed overflow handler.
|
||||
;Even though the entire register didn't overflow, the portion we were operating on did, so that counts.
|
||||
4
Task/Gotchas/68000-Assembly/gotchas-6.68000
Normal file
4
Task/Gotchas/68000-Assembly/gotchas-6.68000
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
MOVE.B #16-1,D0 ;loop 16 times
|
||||
forloop:
|
||||
; loop body goes here
|
||||
DBRA D0,forloop
|
||||
2
Task/Gotchas/68000-Assembly/gotchas-7.68000
Normal file
2
Task/Gotchas/68000-Assembly/gotchas-7.68000
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
MOVEA.W #$8000,A0 ;MOVEA.L #$FF8000,A0
|
||||
MOVEA.W #$7FFF,A0 ;MOVEA.L #$007FFF,A0
|
||||
2
Task/Gotchas/68000-Assembly/gotchas-8.68000
Normal file
2
Task/Gotchas/68000-Assembly/gotchas-8.68000
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
MOVE.W #$FF,D0 ;MOVE.W #$00FF,D0
|
||||
MOVE.L #$8000,D2 ;MOVE.L #$00008000,D2
|
||||
5
Task/Gotchas/68000-Assembly/gotchas-9.68000
Normal file
5
Task/Gotchas/68000-Assembly/gotchas-9.68000
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
MOVE.W #$FF,D0
|
||||
EXT.W D0 ;D0 = $????FFFF
|
||||
|
||||
MOVE.L #$8000,D1
|
||||
EXT.L D1 ;D1 = $FFFF8000
|
||||
Loading…
Add table
Add a link
Reference in a new issue