Commits

Anonymous committed a0f0821

added the rest of base words to the compiler

  • Participants
  • Parent commits 8a34f23

Comments (0)

Files changed (1)

File compiler/j1c.go

 		} else if w == "1-" {
 			emitAlu(10, false, false, false, false, 0, 0)
 		} else if w == "2r>" {
-
+			emitAlu(11, true, false, false, false, 1, -1)
+			emitAlu(11, true, false, false, false, 1, -1)
+			emitAlu(1, true, false, false, false, 0, 0)
 		} else if w == "2>r" {
-
+			emitAlu(1, true, false, false, false, 0, 0)
+			emitAlu(1, false, false, true, false, -1, 1)
+			emitAlu(1, false, false, true, false, -1, 1)
 		} else if w == "2r@" {
-
-		} else if w == "unloop" {
-
-		} else if w == "exit" {
-
+			emitAlu(11, true, false, false, false, 1, -1)
+			emitAlu(11, true, false, false, false, 1, -1)
+			emitAlu(1, true, false, false, false, 1, 0)
+			emitAlu(1, true, false, false, false, 1, 0)
+			emitAlu(1, false, false, true, false, -1, 1)
+			emitAlu(1, false, false, true, false, -1, 1)
+			emitAlu(1, true, false, false, false, 0, 0)
 		} else if w == "dup@" {
-
+			emitAlu(12, true, false, false, false, 1, 0)
 		} else if w == "dup>r" {
-
+			emitAlu(0, false, false, true, false, 0, 1)
 		} else if w == "2dupxor" {
-
+			emitAlu(5, true, false, false, false, 1, 0)
 		} else if w == "2dup=" {
-
+			emitAlu(7, true, false, false, false, 1, 0)
 		} else if w == "!nip" {
-
+			emitAlu(0, false, false, false, true, -1, 0)
 		} else if w == "2dup!" {
-
+			emitAlu(0, false, false, false, true, 0, 0)
 		} else if w == "up1" {
-
+			emitAlu(0, false, false, false, false, 1, 0)
 		} else if w == "down1" {
-
+			emitAlu(0, false, false, false, false, -1, 0)
 		} else if w == "copy" {
-
+			emitAlu(1, false, false, false, false, 0, 0)
 		} else {
 			return false
 		}