SecondBASIC Documentation v3

Home / Command Reference / RegMove.b, RegMove.l, RegMove.w

RegMove.b, RegMove.l, RegMove.w

Description: Copies a 68K register into a BASIC variable or to a 68K register. The data used is dependent on the suffix used with the RegMove command. The data for each suffix is as follows: .b is a byte, .l is a long word, and .w is a word. The <Source> and the <Destination> cannot be both BASIC variables or 68K registers. The <Source> must be a BASIC variable if the <Destination> is a 68K register,and vice versa.

Syntax:

RegMove.b <Source>, <Destination>
RegMove.l <Source>, <Destination>
RegMove.w <Source>, <Destination>

Part Description
<Source> Required. The source can be a BASIC variable or a 68K register. 68K registers are d0 to d7 and a0 to a7.
<Volume> Required. The destination can be a BASIC variable or a 68K register. 68K registers are d0 to d7 and a0 to a7.

Example:

    a = 65
    b& = 1000
 
    RegMove.w a,d0
    RegMove.w d0,b&
 
    Print b&