Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need a flowchart for that thanks Your program should be able to accept either one or two command line parameters. In either case, the first
need a flowchart for that thanks
Your program should be able to accept either one or two command line parameters. In either case, the first task is to read the current state of the LEDs on the OUSB board (Port B) Command Line lab_1234567.exe Param1 lab_1234567.exe Param1 Param2 lab_1234567_9876543.exe Param1 lab_1234567_9876543.exe Param1 Param2 or or If ONE parameter is entered via the command line, 'lab_1234567.exe 13', this value should be subtracted from the current value of the LEDs on the OUSB board. The result of the subtraction should be written to the console as well as to the OUSB board Example: If the current value of the OUSB LEDs is 27, lab_1234567.exe 13' should output 14 to the console and be written to the OUSB board If TWO parameters are entered via the command line, 'lab 1234567.exe 13 9, both values should be subtracted from the current value of the LEDs on the OUSB board. The result of the subtraction should be written to the console as well as the OUSB board Example: If the current value of the OUSB LEDs is 27, 'lab 1234567.exe 13 9' should output 5 to the console and be written to the OUSB board NOTE: In both cases, the input parameters could be negative or positive If after subtraction, the value calculated for Port B is greater than 255, the modulus of 256 is to be written to Port B If after subtraction, the value calculated for Port B is less than zero, 256 is to be added to the calculated value and this new value written to Port B. The 'wrapped' value should be written to the console and the OUSB board The OUSB board outputs command which are sent to it in default form. You will be required to change this. Example: ousb.exe io portb 128, will output PORTB = 128 to the console Your code should display ONLY the numbers, 128 The only text in the command shell window should be text returned from the OUSB board in response to your code or a character which corresponds to an error condition. NO debug code should appear in the command shell window Access to the OUSB board is via the executable binary file: ousb.exe For this laboratory, you are required only to use: ousb.exe -r io portb When the program is run without any operands, lab_1234567.exe, the program MUST print the student ID string in the formm 1234567,s1234567 FullNameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started