add rpush and rpop stack instructions
This commit is contained in:
@@ -10,5 +10,27 @@
|
||||
(pop r1 @r0)
|
||||
(cmp r1 1 (ne? (fault)))
|
||||
|
||||
; test reverse push
|
||||
(push @r0 1)
|
||||
(push @r0 7)
|
||||
(rpush @r0 8)
|
||||
|
||||
(pop r1 @r0)
|
||||
(cmp r1 7 (ne? (fault)))
|
||||
|
||||
(pop r1 @r0)
|
||||
(cmp r1 1 (ne? (fault)))
|
||||
|
||||
(pop r1 @r0)
|
||||
(cmp r1 8 (ne? (fault)))
|
||||
|
||||
; test reverse pop
|
||||
|
||||
(push @r0 1000)
|
||||
(push @r0 2000)
|
||||
|
||||
(rpop r1 @r0)
|
||||
(cmp r1 1000 (ne? (fault)))
|
||||
|
||||
(drop @r0)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user