2.Assembler

Worldi·2021년 3월 16일
0

시스템프로그래밍

목록 보기
2/2

What is Assembler ?


Translate mnemonic operation codes to their machine language equivalents.
Assign machine addresses to symbol labels.

Other than the basic functions, designing of an assembler depends heavily upon the machine architecture (e.g., instruction format, addressing mode, machine-dependent 명령어 다름, addressing mode도 다름. )

Outline of Chapter 2

  • Section 2.1 : Fundamental operations of an assembler using SIC.
  • Section 2.2 : Typical extensions via hardware considerations using SIC/XE.
  • Section 2.3 : Most commonly encountered machine-independent features.
  • Section 2.4 : Important design options of an assembler.

Information on the SIC Assembly Language

1) Mnemonic instructions : Section 1.3.1 and Appendix A.
2) Indexed addressing is indicated by adding the modifier “ ,X ” following the operand (line 160 of the program in next slide).
3) Lines beginning with “ . ” contain comments only.
4) Assembler directives (pseudo-instructions) : These statements are not translated into machine codes. Instead, they provide instructions to the assembler itself.

  • START : Specify name and starting address for the program.
  • END : Indicate the end of the source program and (optionally) specify the first executable instruction in the program.
  • BYTE : Generate character or hexadecimal constant, occupying as many bytes as needed to represent the constant.
  • WORD : Generate one-word integer constant.
  • RESB : Reserve the indicated number of bytes for a data area.
  • RESW : Reserve the indicated number of words for a data area.

input devide 에 모든 것을 읽어 들여, output device 에 쓰는 프로그램임.
L register 에 return address 저장. pc는 다음 명령어 (RDREC) 갖고 있음. copy 시작 전 call 한main program 의 주소를 저장하고 있음. 하는 이유! : nested subroutine 이 있을 때 l레지스터의 값 저장해야 한다.

RDREC :input device buffer 읽어 들이는 역할. 4096이라는 메모리 크기 제한이 있다. 4096 bytes data를 input device에 읽어 들이겠다. End og record or 4095 도달할 때까지 진행.

profile
https://worldi.tistory.com/ 로 블로그 이전합니다.

0개의 댓글