adapted to new assembler
This commit is contained in:
parent
eb703a6d80
commit
0bbda61037
|
@ -1,4 +1,9 @@
|
||||||
.define .aar2
|
.define .aar2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Load address of array element, decriptor contains 2-bytes integers
|
! Load address of array element, decriptor contains 2-bytes integers
|
||||||
! Expects on stack: pointer to array descriptor
|
! Expects on stack: pointer to array descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .adi4
|
.define .adi4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Add two 32 bits signed or unsigned integers
|
! Add two 32 bits signed or unsigned integers
|
||||||
! Expects on stack: operands
|
! Expects on stack: operands
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .and
|
.define .and
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Any size logical-'and'.
|
! Any size logical-'and'.
|
||||||
! Expects: size in de-registers
|
! Expects: size in de-registers
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .blm
|
.define .blm
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Block move
|
! Block move
|
||||||
! Expects in de-reg: size of block
|
! Expects in de-reg: size of block
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .cii
|
.define .cii
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Convert integer to integer
|
! Convert integer to integer
|
||||||
! Expects in a-reg: 1 for signed integer to signed integer (cii)
|
! Expects in a-reg: 1 for signed integer to signed integer (cii)
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .cmi4
|
.define .cmi4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Compare 32 bits integers
|
! Compare 32 bits integers
|
||||||
! Expects: operands on stack
|
! Expects: operands on stack
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .cms
|
.define .cms
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Any size compare
|
! Any size compare
|
||||||
! Expects: size in de-registers
|
! Expects: size in de-registers
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .com
|
.define .com
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Complement bytes on top of stack.
|
! Complement bytes on top of stack.
|
||||||
! Expects in de-registers: number of bytes
|
! Expects in de-registers: number of bytes
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .csa
|
.define .csa
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Case jump
|
! Case jump
|
||||||
! Expects on stack: address of case descriptor
|
! Expects on stack: address of case descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .csb
|
.define .csb
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Table lookup jump
|
! Table lookup jump
|
||||||
! Expects on stack: address of case descriptor
|
! Expects on stack: address of case descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .dup
|
.define .dup
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Duplicate top bytes of stack
|
! Duplicate top bytes of stack
|
||||||
! Expects in de-registers: number of bytes to duplicate
|
! Expects in de-registers: number of bytes to duplicate
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
|
|
||||||
.define .dvi2
|
.define .dvi2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
|
|
||||||
! 16 bits signed and unsigned integer divide and remainder routine
|
! 16 bits signed and unsigned integer divide and remainder routine
|
||||||
! Bit 0 of a-reg is set iff quotient has to be delivered
|
! Bit 0 of a-reg is set iff quotient has to be delivered
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .dvi4
|
.define .dvi4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! 32 bits integer divide and remainder routine
|
! 32 bits integer divide and remainder routine
|
||||||
! Bit 0 of a-reg is set iff quotient has to be delivered
|
! Bit 0 of a-reg is set iff quotient has to be delivered
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .exg
|
.define .exg
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Exchange top bytes of stack
|
! Exchange top bytes of stack
|
||||||
! Expects in de-registers the number of bytes to be exchanged.
|
! Expects in de-registers the number of bytes to be exchanged.
|
||||||
|
|
|
@ -3,6 +3,11 @@
|
||||||
.define .zrf4,.zrf8
|
.define .zrf4,.zrf8
|
||||||
.define .cfi,.cif,.cuf,.cff,.cfu
|
.define .cfi,.cif,.cuf,.cff,.cfu
|
||||||
.define .cmf4,.cmf8
|
.define .cmf4,.cmf8
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Floating point is not implemented
|
! Floating point is not implemented
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .inn
|
.define .inn
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Any size bit test on set.
|
! Any size bit test on set.
|
||||||
! Expects in de-reg: size of set (in bytes)
|
! Expects in de-reg: size of set (in bytes)
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .ior
|
.define .ior
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
|
|
||||||
! Any size inclusive-or.
|
! Any size inclusive-or.
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .lar2
|
.define .lar2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Load array element, descriptor contains 2-bytes integers
|
! Load array element, descriptor contains 2-bytes integers
|
||||||
! Expects on stack: pointer to array descriptor
|
! Expects on stack: pointer to array descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .loi
|
.define .loi
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Load indirect
|
! Load indirect
|
||||||
! Expects in de-registers: number of bytes to be loaded
|
! Expects in de-registers: number of bytes to be loaded
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .mli2
|
.define .mli2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! 16 bits signed integer multiply
|
! 16 bits signed integer multiply
|
||||||
! the algorithm multiples A * B, where A = A0*2^8 + A1 and B = B0*2^8 + B1
|
! the algorithm multiples A * B, where A = A0*2^8 + A1 and B = B0*2^8 + B1
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .mli4
|
.define .mli4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! 32 bits signed and unsigned integer multiply routine
|
! 32 bits signed and unsigned integer multiply routine
|
||||||
! Expects operands on stack
|
! Expects operands on stack
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .mlu2
|
.define .mlu2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! 16 bits unsigned multiply routine
|
! 16 bits unsigned multiply routine
|
||||||
! Expects operands on stack
|
! Expects operands on stack
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .ngi4
|
.define .ngi4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Exchange 32 bits integer by its two's complement
|
! Exchange 32 bits integer by its two's complement
|
||||||
! Expects operand on stack
|
! Expects operand on stack
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .nop
|
.define .nop
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
.nop: push b
|
.nop: push b
|
||||||
lhld hol0+4
|
lhld hol0+4
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .rck
|
.define .rck
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Range check
|
! Range check
|
||||||
! Expects on stack: address of range check descriptor
|
! Expects on stack: address of range check descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .rol4
|
.define .rol4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Rotate 4 bytes left
|
! Rotate 4 bytes left
|
||||||
! Expects in de-reg: number of rotates
|
! Expects in de-reg: number of rotates
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .ror4
|
.define .ror4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Rotate 4 bytes right
|
! Rotate 4 bytes right
|
||||||
! Expects in de-reg: number of rotates
|
! Expects in de-reg: number of rotates
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sar2
|
.define .sar2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Store array element, descriptor contains 2-bytes integers
|
! Store array element, descriptor contains 2-bytes integers
|
||||||
! Expects on stack: pointer to array descriptor
|
! Expects on stack: pointer to array descriptor
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sbi4
|
.define .sbi4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Subtract two 32 bits signed or unsigned integers.
|
! Subtract two 32 bits signed or unsigned integers.
|
||||||
! Expects operands on stack
|
! Expects operands on stack
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .set
|
.define .set
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Create set with one bit on
|
! Create set with one bit on
|
||||||
! Expects in de-reg: size of set to be created
|
! Expects in de-reg: size of set to be created
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .set2
|
.define .set2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Create 16 bits set with one bit on
|
! Create 16 bits set with one bit on
|
||||||
! Expects in de-reg: bit number
|
! Expects in de-reg: bit number
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sli2
|
.define .sli2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Shift 16 bits integer left
|
! Shift 16 bits integer left
|
||||||
! Expects on stack: number of shifts
|
! Expects on stack: number of shifts
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sli4
|
.define .sli4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Shift 32 bits integer left
|
! Shift 32 bits integer left
|
||||||
! Expects on stack: number of shifts
|
! Expects on stack: number of shifts
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sri2
|
.define .sri2
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Shift 16 bits signed or unsigned integer right
|
! Shift 16 bits signed or unsigned integer right
|
||||||
! Expects in a-reg.: 1 if signed integer
|
! Expects in a-reg.: 1 if signed integer
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sri4
|
.define .sri4
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Shift 32 bits signed or unsigned integer right
|
! Shift 32 bits signed or unsigned integer right
|
||||||
! Expects in a-reg.: 1 if signed integer
|
! Expects in a-reg.: 1 if signed integer
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .sti
|
.define .sti
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
! Store indirect
|
! Store indirect
|
||||||
! Expects on stack: number of bytes to be stored
|
! Expects on stack: number of bytes to be stored
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
.define .xor
|
.define .xor
|
||||||
|
.sect .text
|
||||||
|
.sect .rom
|
||||||
|
.sect .data
|
||||||
|
.sect .bss
|
||||||
|
.sect .text
|
||||||
|
|
||||||
|
|
||||||
! Any size exclusive-or.
|
! Any size exclusive-or.
|
||||||
|
|
Loading…
Reference in a new issue