3rd and 4th stack operations
bigtreeman
Posts: 32
I would like to use 3rd,
but have gone with >r over r> swap
3rd seems to leave a 3 on the stack
4th seems to leave a 4 on the stack
over works as expected
same result in rom taqoz V1.1--v33h 190219-1900
TAQOZ# .s --- DATA STACK (5) 1 $0000_0009 9 2 $0000_0008 8 3 $0000_0007 7 4 $0000_0006 6 5 $0000_0005 5 ok TAQOZ# 3rd --- ok TAQOZ# .s --- DATA STACK (6) 1 $0000_0003 3 2 $0000_0009 9 3 $0000_0008 8 4 $0000_0007 7 5 $0000_0006 6 6 $0000_0005 5 ok TAQOZ# . --- 3 ok TAQOZ# 4th --- ok TAQOZ# .s --- DATA STACK (6) 1 $0000_0004 4 2 $0000_0009 9 3 $0000_0008 8 4 $0000_0007 7 5 $0000_0006 6 6 $0000_0005 5 ok TAQOZ#
in taqoz.spin2
OVER mov x,b 'read second data item and push jmp #PUSHX ' 3RD ( n1 n2 n3 -- n1 n2 n3 n1 ) Copy the c item onto the stack THIRD mov x,c ' read third data item jmp #PUSHX ' 4TH ( n1 n2 n3 n4 -- n1 n2 n3 n4 n1 ) Copy the 4th item onto the stack - 48cy FOURTH mov x,d jmp #PUSHX
Comments
Strange. In Tachyon both work as expected.
One thing to consider is the fact that TAQOZ is case sensitive and there might already be 3rd and 4th defined (in the lowercase). If that happens, TAQOZ will use these instead of 3RD or 4TH, I think. Have you tried both versions ?
UPPER CASE thank you