shithub: rgbds

Download patch

ref: b0f8d75d1dbabc354aafb56d9a3d37b99e9209c5
parent: 7a314e7aff2a6e9a0f82cc7f98269276fcc167cb
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sun Apr 18 20:05:16 EDT 2021

Shorten quine.asm with \(parenthesized) macro args

--- a/test/asm/quine.asm
+++ b/test/asm/quine.asm
@@ -1,13 +1,11 @@
 MACRO N
-FOR I,_NARG
-PRINT STRSUB("\n\"\\ INRST1,ABCDEFGHMnOPU_+-()",\1+1,1)
-SHIFT
+FOR R,1,_NARG+1
+PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()",\(R)+1,1)
 ENDR
-SHIFT-I
-REPT I-1
+REPT R-2
 PRINT"\1,"
 SHIFT
 ENDR
 PRINT"\1\n"
 ENDM
- N 19,11,13,6,21,3,5,0,16,21,6,3,4,10,24,5,11,6,17,0,22,6,4,5,8,3,7,8,6,7,23,12,27,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,1,10,2,9,25,9,10,9,28,0,7,18,4,16,8,0,15,5,14,6,0,7,18,4,16,8,26,4,0,6,15,22,8,3,4,26,9,0,22,6,4,5,8,1,2,9,10,1,0,7,18,4,16,8,0,15,5,14,6,0,22,6,4,5,8,1,2,9,2,20,1,0,15,5,14,19,0,3,5,3
+ N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,1,9,2,28,5,29,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3
--- a/test/asm/quine.out
+++ b/test/asm/quine.out
@@ -1,13 +1,11 @@
 MACRO N
-FOR I,_NARG
-PRINT STRSUB("\n\"\\ INRST1,ABCDEFGHMnOPU_+-()",\1+1,1)
-SHIFT
+FOR R,1,_NARG+1
+PRINT STRSUB("\n\"\\ PR1NT,ABCDEFGHIMnOSU2_+-()",\(R)+1,1)
 ENDR
-SHIFT-I
-REPT I-1
+REPT R-2
 PRINT"\1,"
 SHIFT
 ENDR
 PRINT"\1\n"
 ENDM
- N 19,11,13,6,21,3,5,0,16,21,6,3,4,10,24,5,11,6,17,0,22,6,4,5,8,3,7,8,6,7,23,12,27,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,1,10,2,9,25,9,10,9,28,0,7,18,4,16,8,0,15,5,14,6,0,7,18,4,16,8,26,4,0,6,15,22,8,3,4,26,9,0,22,6,4,5,8,1,2,9,10,1,0,7,18,4,16,8,0,15,5,14,6,0,22,6,4,5,8,1,2,9,2,20,1,0,15,5,14,19,0,3,5,3
+ N 19,10,12,5,21,3,7,0,15,21,5,3,5,9,6,9,25,7,10,5,16,26,6,0,4,5,18,7,8,3,22,8,5,22,23,11,28,1,2,20,2,1,2,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,1,9,2,28,5,29,26,6,9,6,29,0,14,7,13,5,0,5,14,4,8,3,5,27,24,0,4,5,18,7,8,1,2,6,9,1,0,22,17,18,15,8,0,14,7,13,5,0,4,5,18,7,8,1,2,6,2,20,1,0,14,7,13,19,0,3,7,3