Maxitronix 500 in 1

Thread Starter

idioticlown

Joined Apr 3, 2008
8
Hi anyone has this lab kit? I need help in explaining one of the project. i will post a pic of the assembly language + flowchart later. Hope that u guys can help out. THANKS
 

hgmjr

Joined Jan 28, 2005
9,027
Hi anyone has this lab kit? I need help in explaining one of the project. i will post a pic of the assembly language + flowchart later. Hope that u guys can help out. THANKS
My initial impression is that the code does not agree with the flow chart. There seems to be a flaw in the way the program handles the switches used to select the time interval.

I am reluctant to provide too much information since this is a homework assignment and you need to do most of the heavylifting if you are to benefit from the experience.

It would be helpful if you can tell us what your specific assignment is?

hgmjr
 

Thread Starter

idioticlown

Joined Apr 3, 2008
8
This is the whole problem. We are not specified what to write in the report. I need to demonstrate what i can learn from this and what i can do to improve it..So i really really need help from you guys as i know nuts abt this.Thank you
 

Thread Starter

idioticlown

Joined Apr 3, 2008
8
sort of..but i dun understand line 04. if S1 is on, it produces 0000 0001(B) and if u AND with 01H, u will get back 0000 0001 right? in that case line 04 will get zero-flag of 1 and jumps to line 02..
 

hgmjr

Joined Jan 28, 2005
9,027
sort of..but i dun understand line 04. if S1 is on, it produces 0000 0001(B) and if u AND with 01H, u will get back 0000 0001 right? in that case line 04 will get zero-flag of 1 and jumps to line 02..
You have the right idea. Keep in mind that the flow chart is the road map that should assist you in understanding the code.

Actually the test for the state of the least significant bit in register A will either yield a "0" or a "1". The code execution branches to L02 or line#2 if the bit is zero, otherwise it continues execution with the next instruction where it inputs the value at the input port into register A.

This is a tight loop that is executed until the switch is pressed.

Does that make sense?

hgmjr
 

hgmjr

Joined Jan 28, 2005
9,027
My use of the phrase "tight loop" was solely descriptive and in no way to be construed as a technical term. It simply refers to the program execution loop as involving a small number of instructions that are being execute repetitively until in this case a condition is met that will cause the code to exit the loop and begin executing code at a different point in the program. It is using a technique commonly referred to as "polling". It is polling the state of the switch waiting for it to be pressed. The tighter the loop in a polling situation, the more quickly it can detect the condition being tested for and react by diverting the program execution to a new section of code.

hgmjr
 
Thread starter Similar threads Forum Replies Date
S Programming & Languages 1
Top