[CMPE 310 Home] | [Syllabus] | [Homework] | [Projects] | [Lecture Notes] | [Printable all notes] | [Files] | [NASM resource] |
Drag and drop files between Windows and linux.gl.umbc.edu. Download and install winscp, follow this link for help: WinSCP and NotePad++
A computer system is built from bottom up:
APPs
assembler, compiler, tools, ...
operating system DOS, Windows, Linux, MacOSX, ...
BIOS basic input output system (software)
computer CPU, RAM, I/O, peripherals
CPU central processing unit
logic circuits
solid state devices
The lowest level software, built into the motherboard, is the BIOS.
The BIOS provides services using interrupts, setting the IP to
a specific hardware location.
An operating system may also provide services using interrupts and
procedure and function calls, typically much higher level than BIOS.
Using UMBC computer linux.gl.umbc.edu or Lab ITE 375
From anywhere you can reach the internet or from UMBC skip ssh:
ssh your-username@linux.gl.umbc.edu # or use putty, X, etc.
your-password
mkdir cmpe310 # or whatever directory name you want, only once
cd cmpe310 # every time you log in for CMPE 310
mkdir vhdl_lib # only once
# Get some sample files. (some not needed until later)
cp /afs/umbc.edu/users/s/q/squire/pub/download/hello_64.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hellok_64.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hello_32.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hellok_32.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/boot1.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hello.vhdl .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hello.run .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hello.v .
# be sure to type the final space dot
# you can type in the command lines or get these Makefile's
cp /afs/umbc.edu/users/s/q/squire/pub/download/Makefile_nasm1 .
cp /afs/umbc.edu/users/s/q/squire/pub/download/Makefile_vhdl1 .
cp /afs/umbc.edu/users/s/q/squire/pub/download/vhdl_cshrc .
cp /afs/umbc.edu/users/s/q/squire/pub/download/hdl.var .
cp /afs/umbc.edu/users/s/q/squire/pub/download/cds.lib .
cp /afs/umbc.edu/users/s/q/squire/pub/download/Makefile_verilog1 .
# test compile hello_64.asm hellok_64.asm
# test compile hello_32.asm hellok_32.asm
nasm -f elf64 hello_64.asm # or just make -f Makefile_nasm1
gcc -m64 -o hello_64 hello_64.o
./hello_64 > hello_64.out
cat hello_64.out
ls -ltr # see files you have
# repeat for hellok_64 hello_32 hellok_32
Or type
make -f Makefile_nasm1
ls -ltr
Notice, once running a Makefile, running it again typically says:
make: Nothing to be done for 'all'
delete rm -f hello_64.out then make again, it runs
or edit hello_64.asm then make again, it runs
If this did not work, ask for help
# test verilog hello.v
source /afs/umbc.edu/software/cadence/etc/setup_2008/cshrc.cadence
make -f Makefile_verilog1
# test VHDL hello.vhdl
source vhdl_cshrc
make -f Makefile_vhdl1
It really saves typing and allows typical many runs to get
correct results, when you use a Makefile.
If the file name is just "Makefile" then just type "make"
rather than make -f Makefile
Lab2, Project 1"
cds.lib and hdl.var vhdl_cshrc updated since last lab
You can do this in Lab.
Project 1
log into your account
cd cmpe310
use your favorite editor to create a file convert.asm or
cp hello_64.asm convert.asm
edit convert.asm changing hello_64 to convert
edit Makefile_nasm1 adding convert.out to all: list
copy hello_64 stuff changing hello_64 to convert
make -f Makefile_nasm1
you should see output, now put a little of HW1
into convert.asm and make again
(you could cp Makefile_nasm1 Makefile then just type make)
You may want some sample files to cut-n-paste from
cp /afs/umbc.edu/users/s/q/squire/pub/download/printf2_64.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/intarith_64.asm .
cp /afs/umbc.edu/users/s/q/squire/pub/download/fltarith_64.asm .
You may want some constants in .data
one: dq 1 ; 126 = 1*100 + 2*10 + 6 now in binary
ten: dq 10 ; use shift with "and" to get one bit for printing
i100: dq 100
tenth: dq 0.1
hunth: dq 0.01
thoth: dq 0.001
eight: dq 8.0 ; floating multiply, add, then
; *8.0 store as integer, print "." 3 bits
web links
hello_64.asm
hellok_64.asm
hello_32.asm
hellok_32.asm
boot1.asm
hello.vhdl
hello.run for vhdl
hello.v
Makefile_nasm1
Makefile_vhdl1
vhdl_cshrc
hdl.var
cds.lib
Makefile_verilog1
Extra shell script and Makefile to do copies
cmpe310_cp.sh
Makefile_cp
Lab1 2, parts and pins
Lab3, manufacturing computers, finish Project 1"
Project 1
Lab4, manufacturing computers, finish Project 4"
near end
Lab5, finish Project 5"
Project 5
Lab6, finish Project 6"
Project 6
Lab7, finish Project 7"
Project 7
Last updated 10/29/2015