Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !
- !
- !
- !
- !
- !
- !
- !
- !
- >-[-[-<]>>+<]>.>,[.<.>,]
- ('!':).(>>=(:"!"))
- REREEeRErEErREeeEeeeeEREEeeREEeereeREEEEeeEReee
- 33
- ..
- ",@
- I / O stack
- 0,0,0,...
- 3 - pop * 10 + 3 3,0,0,0,...
- - 2 neighbours, forward
- 3 - pop * 10 + 3 33,0,0,0,...
- - 2 neighbours, forward
- . - pop & print chr ! 0,0,0,...
- - T junction from the side
- - TOS==0, forward
- , - read chr or -1 L 76,0,0,0,... or -1,0,0,0
- - T junction from the base
- - if TOS > 0 right:
- " - no-op 76,0,0,0,...
- - 2 neighbours, forward
- . - pop & print chr L 0,0,0,...
- - T junction from the side
- - TOS==0, forward
- 3 - ...back to the start
- - elif TOS == -1 left:
- @ - exit we're out!
- * right, but on the first occasion (from above) we hit the wall and turn
- around, so that's like a left
- €'!Ć
- A=!
- ?=?!
- bash-5.0$ echo -ne '1 2 3 4 5 6n129591 129012 129127 129582nn0' | gema 'A=!;?=?!'
- !1! !2! !3! !4! !5! !6!
- !1!2!9!5!9!1! !1!2!9!0!1!2! !1!2!9!1!2!7! !1!2!9!5!8!2!
- !
- !0!
- Ż”!ṁż
- Ż”!ṁż - Main Link: list of characters, s e.g. "abc"
- ”! - character '!' '!'
- ṁ - mould like:
- Ż - s with a zero prepended "!!!!"
- ż - zip together with s ["!a","!b","!c",'!']
- - implicit (smashing) print !a!b!c!
- rP'!
- ï'! i'!
- '!',,@,.&'!'
- õ.ø'!ý
- É'!'!
- É for each character do the next 3 operations
- '! push single character "!"
- swap top elements
- '! push single character "!"
- '!,#@~,
- ⭆S⁺!ι!
- ⪫!!⪫S!
- I	I =INPUT	:F(END)
- S	I LEN(1) . X REM . I	:F(O)
- 	O ='!' O X	:(S)
- O	OUTPUT =O '!'
- 	O =	:(I)
- END
- _z'!R
- +!s+R!
- Code | Explanation
- ----------+-------------------------------------
- +!s+R! | Code
- +!s+R!Q | with implicit variables filled
- ----------+-------------------------------------
- R Q | For each d in input, replace d with:
- +R! | d+"!"
- s | Join results on empty string
- +! | Add "!" to beginning
- | Print (implicit)
- 붖다따삭바사빠맣삭붛
- 밙봆@뫃선차희져썬뻐
- BB 01 00 53 59 BA 0B 01 B4 40 CD 21 4A 4B B4 3F CD 21 85 C0 74 09 B4 40 43 41 CD 21 49 EB EE C3
- IDEAL
- MODEL TINY
- CODESEG
- ORG 100H
- ;; DOSBox (tested with 0.74-2) didn't seem to handle Ctrl-Z as EOF
- ;; so uncomment the ";;" lines to run it there.
- MAIN:
- MOV BX,1
- PUSH BX
- POP CX
- MOV DX,OFFSET MAIN_1+1 ; The 21H in INT 21H
- MOV AH,40H
- MAIN_1:
- INT 21H
- DEC DX
- ;;PUSH DX
- ;;POP SI
- IO_LOOP:
- DEC BX
- MOV AH,3FH
- INT 21H
- ;;; This should work on an non-emulated PC.
- ;;;AAA ; AL=0?
- TEST AX,AX
- JZ DONE
- ;;CMP [BYTE PTR SI],1AH
- ;;JZ DONE
- MOV AH,40H
- INC BX
- INC CX
- INT 21H
- DEC CX
- JMP IO_LOOP
- DONE:
- RET
- ENDS
- END MAIN
- [N
- S S N
- _Create_Label_LOOP][S S S N
- _Push_0][S N
- S _Duplicate_0][T N
- T S _Read_STDIN_as_character][T T T _Retrieve_input][S N
- S _Duplicate_input][S S S T S S T N
- _Push_9_tab][T S S T _Subtract][N
- T S S N
- _If_0_jump_to_Label_END][S S S T S S S S T N
- _Push_33_!][T N
- S S _Print_as_character][T N
- S S _Print_as_character][N
- S N
- N
- _Jump_to_Label_LOOP][N
- S S S N
- _Create_Label_END][S S S T S S S S T N
- _Push_33_!][T N
- S S _Print_as_character]
- Start LOOP:
- Character c = STDIN as character
- If(c == 't'):
- Call function END
- Print '!'
- Print c
- Go to next iteration of loop
- function END:
- print '!'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement