CS 217 – ‘Computer Architecture with Assembly Programming’, hearing this course description gave me frights. I didn’t have even a little confidence that I could be receptive to lessons before that shall be taken in the entire semester, but I was able to cope with the pace as we progressed.. Truly this course is difficult but I had a lot of fun learning assembly language. It is mainly because it was fun learning with teacher and classmates rather than alone. And what makes assembly programming fun is because succeeding to do so gives me a sense of accomplishment. During our last meeting, we were planning to possibly have a group assembly learning during the next sem… possibly dwelling on OS stuffs. The idea was actually brilliant because this coming sem we will have OS class, and an application such as OS programming will really help me understand OS all the more. I also want to learn how to debug. I wish to master assembly programming, however I need to remain idle for the mean time to give way for our thesis. Our thesis is much more important as for this moment. Assembly could wait, I just hope I won’t lose the enthusiasm when I’m ready to continue.
As an end activity in this class, we were assigned to do our own editor. This is hard… and my code was really messy… If it were not because experts help me to improve my original code…I really doubt I would be posting the code here. Anyways, here it is though improvements can still be made.
This is our CS 315 final project. We were asked to do some simple OpenGL program incorporating projection, illumination, transformation, and the like in C++. I and my partner JC, chose to improve Mr. So’s clock program. We added more commands and capabilities such that it would really function like a real clock. When our program runs, our clock’s time is set according to system time. We also added some ticks and beep sound
Too much for the introduction, just run and see how we did it….
This program beeps every 15 seconds unless you exit command prompt. I enjoyed running this, even adjusting the time and made it beep faster. People at home were worried and at the same time amazed of what i have done. Though i just read about this and revised a little. Try running this and enjoy!
;——————–initialize tsr———————-
init:
cli ; prevent further interrupts
mov ah, 35h ; get the current CS:IP
mov al, 08h ; of int 08
int 21h ; result to ES:BX
mov word ptr oldint8, bx ; save BX
mov word ptr oldint8+2, es ; save ES
mov ah, 25h ; set CS:IP
mov al, 08h ; for the new INT 08
mov dx, offset routine ; DX=offset IP,
int 21h ; DS=CS set by COM
mov ah, 31h ; request stay resident
mov dx, offset init ; set size of resident portion
sti ; restore interrupts
int 21h
oldint8 dd ?
count dw 275 ; 275 X 54.94 ms = 15 seconds
;———————–resident program—————————
routine:
dec cs: count ; is the time up?
jnz exit
mov cs: count, 275 ; if yes initialize the count
mov ah, 0eh ; and
mov al, 7 ; beep the speaker
int 10h
exit:
jmp cs: oldint8 ; take care of INT 08