Welcome to Systems SoftwareSlide 2ConcernedApplication ProgramsSystems ProgramsAssembler Program - SIC (Intermediate Code)Assembler Program – SIC/XE (Intermediate Code)SIC / SICXECHARACTERISTICS OFSIC Architecture - MemorySIC Architecture - RegistersRegister Names and Usage - SICData Formats - SICData Formats ExampleInstruction Formats - SICAddressing Modes - SICInstruction Set - SICInput/Output - SICSlide 19SIC/XE Architecture - MemorySIC/XE Architecture - RegistersRegister Names and Usage – SIC and SIC/XEFOUR Additional Registers and their Usage SIC/XEData Formats – SIC/XESlide 25Floating Point Format SIC/XEFloating Point (cont) SIC/XESlide 28Slide 29Slide 30Instruction Formats – SIC/XESlide 32Addressing Modes – SIC/XE Format 3/4 InstructionAddressing Modes – SIC/XE Format 3/4 Instruction (cont)Addressing Modes – SIC/XE Format 3/4 Instruction the disp (cont)Instruction Set – SIC/XEInput/Output – SIC/XESummary Addressing ModesSlide 39Slide 40Slide 41Welcome to Systems SoftwareThe purpose of this course is to provide background in fundamental types of system software, particularly assemblers, loaders, macro processors, and linkage editors.The course uses a simplified instructional computer (SIC and SIC/XE) to illustrate machine level system software requirements.Welcome to Systems SoftwareA major objective of the course will be for students to design and implement a working (cross) assembler for SIC and part of SIC/XE.ConcernedApplication programs–Machine independent–Solves a specific problemSystems programs–Machine dependent–Support computers operationCompilerAssemblerLinkerLoaderOSApplication ProgramsC/C++, Java, Perl, Python, Fortran, PL/1, LISP, Prolog, Pascal, C#, RubyPrograms to sort, search, etc.Systems ProgramsCompiler–Translates application programs to intermediate codeAssemblers–Translates intermediate code to machine codeLinkers–Links the machine code modules into oneLoaders–Loads the machine code in memoryOS–Controls the operation of the computerAssembler Program - SIC (Intermediate Code)LDA FIVE Load 5 into ASTA ALPHA Store in ALPHALDCH CHARZ Load character ‘Z’ into ASTCH C1 Store in C1 . .ALPHA RESW 1 one word variableFIVE WORD 5 one word constantCHARZ BYTE C’Z’ one byte constantC1 RESB 1 one byte variableAssembler Program – SIC/XE (Intermediate Code)LDA #5 Load 5 into ASTAALPHA Store in ALPHALDCH #90 Load character ‘Z’ into ASTCH C1 Store in C1 . .ALPHA RESW1 one word variableC1 RESB 1 one byte variableSIC / SICXESimple Instruction ComputerSimple Instruction Computer ExtendedDesigned to be similar to real computersDesigned to avoid unnecessary detailCHARACTERISTICS OF SICSIC Architecture - MemoryBytes – 8 bitsWord – 3 bytes (24 bits)Byte addressable Words addressed by lowest byte32767 (215) bytes of total memorySIC Architecture - Registers5 registers Each a full wordEach special purposeRegister Names and Usage - SICA 0 Accumulator; used for arithmeticX 1 Index register; used for addressingL 2 Linkage resister; used for return addressPC 8 Program counter; address of next inst.SW 9 Status word; variety of information including a condition code (CC)Data Formats - SICIntegers – 24 bit binary 2’s complementCharacters – 8 bit ASCIINo floating pointData Formats ExampleInteger 5 000000000000000000000101-5 111111111111111111111011Character A 01000001 R 01010010Instruction Formats - SIC24 bit 8 bit opcode 1 bit addressing mode 15 bit addressAddressing Modes - SICDirect x = 0 Target address = addressIndexed x = 1 Target address + (X) (X) is the contents of register XInstruction Set - SICLoad and Store Registers–LDA, LDX, STA, STX, etc.Integer Arithmetic (all involve register A)–Add, SUB, MUL, DIVCompare–COMP – compares A with a word in memory–Sets the CC in the SWJump instructions–JLT, JEQ, JGT – based on the CC as set by COMPSubroutine Linkage–JSUB – jumps to subroutine, places return address in L–RSUB – returns, using the address in LInput/Output - SICTD – test device is ready to send/receive data–CC of < means device is ready–CC of = means device is not readyRD – read data, when the device is readyWD – write dataTransfers 1 byte at a time to or from the rightmost 8 bits of register A.Each device has a unique 8-bit code as an operand.CHARACTERISTICS OF SIC/XESIC/XE Architecture - MemoryBytes – 8 bitsWord – 3 bytes (24 bits)Byte addressable Words addressed by lowest byte1 meg (220) bytes of total memory (more memory leads to a change in instruction formats and addressing modesSIC/XE Architecture - Registers5 registers of SIC + 4 additionalEach a full wordEach special purposeRegister Names and Usage – SIC and SIC/XEA 0 Accumulator; used for arithmeticX 1 Index register; used for addressingL 2 Linkage resister; used for return addressPC 8 Program counter; address of next inst.SW 9 Status word; variety of information including a condition code (CC)FOUR Additional Registers and their Usage SIC/XEB 3 Base register, used for addressingS 4 General register – no special useT 5 General register – no special useF 6 Floating-point accumulator (48 bits)Data Formats – SIC/XEIntegers – 24 bit binary 2’s complementCharacters – 8 bit ASCIIFloating point – 48 bit floating pointData Formats – SIC/XE24 bit integer48 bit floating point1 bit sign 11 bit exponent 36 bit fractionFloating Point Format SIC/XEFraction is a value between 0 and 1The binary point is immediately before the high order bit which must be 1The exponent is an unsigned binary number between 0 and 2047Floating Point (cont) SIC/XESuppose the exponent is e and the fraction is fThe number is f * 2 (e+1024)0 sign is positive1 is negative0 is all bits including sign are 0Data Formats ExampleInteger 5 = 000000000000000000000101-5 = 111111111111111111111011Character A 01000001Data Formats ExampleFloat 4.89 = .100111000111101011100001010001111010111000010100 * 23 (1027)=0 10000000011 100111000111101011 100001010001111010Data Formats ExampleFloat -.000489 =
View Full Document