상위 질문
타임라인
채팅
관점
코어 워
위키백과, 무료 백과사전
Remove ads
코어 워(Core War)는 D. G. 존스와 A. K. 듀드니가 개발한 1984년 프로그래밍 게임이다. 둘 이상의 배틀 프로그램들(일명 "워리어")이 가상 컴퓨터를 통제하기 위해 경쟁한다. 이들 배틀 프로그램들은 레드코드(Redcode)라는 이름의 추상화 어셈블리어로 개발되었다.
레드코드
요약
관점
레드코드는 코어 워에 사용된 프로그래밍 언어이다. MARS(Memory Array Redcode Simulator)라는 가상 머신에 의해 실행된다.
오리지널 8개 명령어는 아래와 같다.
OPcode Mnemonic Argument(s) Action ------- --------- ----- ----- ---------------------------------- 0 DAT B Initialize location to value B. 1 MOV A B Move A into location B. 2 ADD A B Add operand A to contents of location B and store result in location B. 3 SUB A B Subtract operand A from contents of location B and store result in location B. 4 JMP B Jump to location B. 5 JMZ A B If operand A is 0, jump to location B; otherwise continue with next instruction. 6 DJZ A B Decrement contents of location A by 1. If location A now holds 0, jump to location B; otherwise continue with next instruction. 7 CMP A B Compare operand A with operand B. If they are not equal, skip next instruction; otherwise execute next instruction.
Remove ads
외부 링크
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads