Check your privilege. On a different note, I just noticed I left something sit on my floor all night long. I hope no one noticed it or I will have an awkward time explaining it.
Knowledge gained. Be more careful when you've had little sleep for 2 days. You will make careless mistakes.
I can do more than imagine, because I know what it is - - Auto Merge - - also, really happy right now. made a breakthrough in debugging my stupid code.
Tell meeee! I promise I will stop opressing you with my white cis privileges D: Is it Xan? And congrats Xan, you get a debugging cookie. Now do the compiling shake!
yes, I sat on his floor all night long. I was lonely and needed hugs okeeee. *sends to uni through ssh* *compiles and links* *brings back* YAY! I win.
huehue, I r teh smrtz aaaaaaand it passed the marking program. I am very relieved. considering me and a mate spent hours on his program trying to get it to work but to no avail. Spoiler: shield your eyes from the nerdiness Code: .text.global main main: addi $1, $0, 1 #initialize the register that will be used to switch between serial ports receiveCheck: xori $1, $1, 1 #changes the value of register 1 between 1 or 0 xori $5, $1, 1 #gets the opposite value of the inputted serial port lw $2, currentSerial($1) #get the memory address of the selected serial port lw $3, 0x3($2) #grabs the status register andi $3, $3, 1 #checks to see if the Receive Data Ready bit is empty beqz $3, receiveCheck #if its not ready to take a value, loop lw $4, 1($2) #if it is, grab the value thats being held transmitCheck: lw $9, currentSerial($5) #gets the memory address of the opposite serial port lw $6, 0x3($9) #gets the status register for tht port andi $6, $6, 2 #checks to see if the Transmit Data Ready bit is empty beqz $6, transmitCheck #if its not ready to send, loop j toupper #if it is, jump to the upper/lower case algorithm output: sw $4, 0($9) #displays the typed character in the necessary port j main #loop back to the beginning toupper: sgti $7, $4, 96 #checks to see if its above the lower boundary of lower case letters slti $8, $4, 123 #checks to see if its above the higher boundary of upper case letters and $7, $7, $8 #compares the boundaries to see if the value is between them beqz $7, tolower #if its outside the boundaries, try the lower case checker subi $4, $4, 32 #reduce the value to the lower case form j output #jump back to output the value tolower: andi $10, $2, 0x01000 #compares the value of the serial port is used bnez $10, output #if its the VT320 Terminal, just output sgti $10, $4, 64 #checks to see if its above the lower boundary of upper case letters slti $11, $4, 91 #checks to see if its above the higher boundary of upper case letters and $10, $10, $11 #compares the boundaries to see if the value is between them beqz $10, output #if its outside the boundaries, output as is addi $4, $4, 32 #if its inside, change the value to its lower case form j output #jump to output the value .data currentSerial: .word 0x70000 .word 0x71000
thats what my comments are for or at least they're supposed to be - - Auto Merge - - Is a video that may never actually be made suffice?
I will treasure it always. Spoiler: if you want to know what the thing actually does Write a program that combines the functionality of both programs in questions 5 and 6 simultaneously. That is, the program should output uppercase versions of the characters typed on the VT320 terminal to the Linux machine, while also outputting switched case letters typed on the Linux machine to the VT320 terminal. To achieve this, you’ll need a loop that repeatedly polls each serial device in turn to see if a character has been received and if so, modifies and outputs that character as appropriate.