MS-DOS 16 비트 기계 코드 : 199 바이트
이 사이트를 사용하여 디코딩 하고 'koch.com'파일로 저장하고 WinXP 명령 프롬프트에서 실행하십시오.
sCAAxo7ajsKLz/OquF9fulwvvUoBM9u+BADoiQDodgDocwDogADobQDoagDodwCK8TLSs0+I98cHDQrGRwIktAnNIf7GOO5+7MNWAVwBYwFsAXoBgwGJB4DDAsOIN/7D6QQA/suIF/7P6R0A/suAPyB1AogH/suIB8OBw/8AiDfpBgD+x4gX/sM4734Ciu84z30Cis/Dg8UIg8UCgf1WAXLzg+0Mw07/dgB0GV/o9v/o5v/o8P/o3f/o2v/o5//o1//o4f9Gww==
최신 정보
읽기 쉬운 어셈블러 버전은 다음과 같습니다.
; L-System Description
;
; Alphabet : F
; Constants : +, -
; Axiom : F++F++F
; Production rules: F -> F-F++F-F
;
; Register usage:
; _ _
; bp = direction: 0 = ->, 1 = /|, 2 = |\, 3 = <-, 4 = |/_, 5 = _\|
; cl = min y, ch = max y
; bl = x (unsigned)
; bh = y (signed)
; si = max level
; clear data
mov al,20h
add dh,al
mov ds,dx
mov es,dx
mov cx,di
rep stosb
mov ax,'__'
mov dx,'/\'
; initialise variables
mov bp,Direction0
xor bx,bx
mov si,4
call MoveForward
call TurnRight
call TurnRight
call MoveForward
call TurnRight
call TurnRight
call MoveForward
mov dh,cl
xor dl,dl
mov bl,79
OutputLoop:
mov bh,dh
mov w [bx],0a0dh
mov b [bx+2],24h
mov ah,9
int 21h
inc dh
cmp dh,ch
jle OutputLoop
ret
Direction0:
dw MoveRight
dw MoveUpRight
dw MoveUpLeft
dw MoveLeft
dw MoveDownLeft
dw MoveDownRight
Direction6:
MoveRight:
mov w [bx],ax
add bl,2
ret
MoveUpRight:
mov b [bx],dh
inc bl
jmp DecBHCheckY
MoveUpLeft:
dec bl
mov b [bx],dl
DecBHCheckY:
dec bh
jmp CheckY
MoveLeft:
dec bl
cmp b [bx],20h
jne MoveLeftAgain
mov [bx],al
MoveLeftAgain:
dec bl
mov [bx],al
ret
MoveDownLeft:
add bx,255
mov b [bx],dh
jmp CheckY
MoveDownRight:
inc bh
mov b [bx],dl
inc bl
CheckY:
cmp bh,ch
jle NoMaxChange
mov ch,bh
NoMaxChange:
cmp bh,cl
jge NoMinChange
mov cl,bh
NoMinChange:
ret
TurnRight:
add bp,8
TurnLeft:
add bp,2
cmp bp,Direction6
jb ret
sub bp,12
ret
MoveForward:
dec si
push [bp]
jz DontRecurse
pop di
call MoveForward
call TurnLeft
call MoveForward
call TurnRight
call TurnRight
call MoveForward
call TurnLeft
call MoveForward
DontRecurse:
inc si
ret