Department of Electrical and Computer Engineering
Dalhousie University

ECED 3403: Computer Architecture

Summer 2018

Last updated: 18 July 2018


Dr. Larry Hughes
Department of Electrical and Computer Engineering
Dalhousie University

Room C-369
Telephone: 902.240.0245
E-mail: [at]


18 July 2018: The instruction blt FLoop in shortarrayinit.asm should read bge FLoop. 11 July 2018:
  • A revised version of the X-MakinaISA.pdf document is available. Numerous typos have been corrected and section 9 (Interrupts, faults and traps) has been expanded to include examples of single and multiple interrupts.

    10 July 2018:
  • Several typos in Emulating X-Makina's Devices relating to the DBA-bit and output have been found and corrected.

    9 July 2018:
  • Using a union-pointer can be useful when accessing the PSW bits. The following zip file contains code that updates the individual PSW bits (V, N, Z, C) using a union pointer. Using this code requires pswptr to be defined in, for example, the mainline (union psw_overlay *pswptr;). This code will be discussed in class on 10 July 2018.

    8 July 2018:
  • A summary of instructions affecting the PSW bits can be found here. You can use these if you wish; however, if you have adopted a different algorithm, that is acceptable.

    7 July 2018:
  • A corrected version of Interrupt_IO_Example.asm is available. (Thanks to Mark Hopper for finding the errors.)
  • The following C Programming Primer might be useful if you help with structs, unions, or pointers.
  • With respect to the assembler and MOVH (from page 15 of the X-Makina Assembler User's Guide):
    6 Known limitations
    The assembler has the following known limitation as of 10 May 2018:
    1. The MOVH instruction takes the most significant 8-bits of the 16-bit value.  Using an 8-bit value will result in the assembler using a value of $00:
     MOVH		#$FFEE,R0	; R0 = $FF
     MOVH		#$FF,R0	; R0 = $00

    2 July 2018:
  • Assignment 3 is now avaiable.

    1 July 2018:
  • The entry for BN in Table 8 of the ISA document should read
    PC ← PSW.N=1 ? PC+label : PC
  • A two-dimensional table can be created to handle registers and constants. The following example may prove useful if you are unfamiliar with two-dimensional arrays in C.

    29 June 2018
  • On 1 June 2018, the opcodes for instructions DADC through SXT were changed on the assembler (and hence X-Makina itself). 28 June 2018
  • Example of how bits can be accessed in a short using a structure mask and a union
    27 June 2018 Important: Version 1.18 of the X-Makina assembler is available. It contains corrections to the LD (Load) instruction. You should use this version of the assembler when testing your emulator. Thanks to Ray Su for finding the error.
    27 June 2018 The bus example code and an example of function pointers are now available.
    26 June 2018 For an example of code accessing an S-Record file, click here.
    24 June 2018 The LD SRC,DST instruction in Table 3 in the ISA document should modify the SRC register, not the DST. The operand pairs should be: SRC,DST; +SRC,DST; -SRC,DST; SRC+,DST; SRC-,DST.
    21 June 2018: Information on interrupts is available.
    21 June 2018: Examples of polling and interrupt-driven software is available from the X-Makina documentation and software webpage.


    Students taking ECED 3403 are expected to have a good understanding and working knowledge of algorithms and software design (ECED 3400, Systems Analysis), programming in C or C++ (ENGM 3282, Data Structures and Numerical Methods), and the fundamentals of Instruction Set Architectures (ECED 3204, Microprocessors).

    Final Examination

    The final exam will be held on Saturday 4 August 2018 in rooms D414 and D501.

    Course Outline

    For a copy of the Course Outline, click here.

    Visual Studio

    It is highly recommended that you use Visual Studio Community 2017 for your software work in the course. It has an IDE, compiler, linker, and debugger, as well as extensive libraries. Copies can be obtained from Visual Studio Downloads. Note that the download is a lengthy process.

    The TAs will be giving an introduction to Visual Studio during the lab on 8 May 2018.

    DEV C++ is not recommended.

    Classrooms and lab

    TuesdayB227 (Sexton)10:05-11:25am
    TuesdayP5260 (LSC-Psychology Studley)3:05-5:00pm
    ThursdayP5260 (LSC-Psychology Studley)3:05-4:30pm

    Contact hours and locations

    TuesdayC-369 (Sexton)9:30am-10am
    TuesdayC-369 (Sexton)11:30am-2:15pm
    TuesdayP5260 (Studley)5pm-6pm (with Gary and Justin)
    ThursdayC-369 (Sexton)10:30am-2:15pm
    ThursdayP5260 (Studley)4:30pm-6pm (with Gary and Justin)
    SaturdayB227 (Sexton)10am-noon (Gary and Justin)

    X-Makina Documentation and Support Software

    Documentation and support software for the X-Makina machine can be found here.

    Coding examples from class and help sessions.

    Recommended reading material

    Course reading material from the internet can be found here.


    Assignments are to be done individually. Assignments that are found to be copies of work done by other students will result in an immediate dismissal from this course.

    The course software testing requirements can be found here.


    Course information

    Contact Dr. Hughes for more information about this course.