Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View 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

View file

@ -0,0 +1 @@
DC.B $45 ;this is the literal constant value $45, not "the value stored at memory address 0x0045"

View 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.

View file

@ -0,0 +1,2 @@
LEA $A04000,A0 ;effectively MOVEA.L #$A04000,A0
LEA (4,A0),A0 ;effectively ADDA.L #4,A0

View 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.

View file

@ -0,0 +1,4 @@
MOVE.B #16-1,D0 ;loop 16 times
forloop:
; loop body goes here
DBRA D0,forloop

View file

@ -0,0 +1,2 @@
MOVEA.W #$8000,A0 ;MOVEA.L #$FF8000,A0
MOVEA.W #$7FFF,A0 ;MOVEA.L #$007FFF,A0

View file

@ -0,0 +1,2 @@
MOVE.W #$FF,D0 ;MOVE.W #$00FF,D0
MOVE.L #$8000,D2 ;MOVE.L #$00008000,D2

View file

@ -0,0 +1,5 @@
MOVE.W #$FF,D0
EXT.W D0 ;D0 = $????FFFF
MOVE.L #$8000,D1
EXT.L D1 ;D1 = $FFFF8000