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