Skip to content
This repository has been archived by the owner on Sep 19, 2022. It is now read-only.

Commit

Permalink
fix: print term
Browse files Browse the repository at this point in the history
  • Loading branch information
specialfish9 committed Sep 15, 2022
1 parent 95d903f commit 2a6f7c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/sys_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,11 @@ int write_to_printer(unsigned int virtAddr, int len, unsigned int asid)
return i;
}

unsigned int var7;
int write_to_terminal(unsigned int virtAddr, int len, unsigned int asid)
{
var7 = virtAddr;

termreg_t *dev_reg;
unsigned int status;
size_tt i;
Expand All @@ -153,7 +156,7 @@ int write_to_terminal(unsigned int virtAddr, int len, unsigned int asid)

for (i = 0; i < len; i++) {
/* carico il carattere da trasmettere sul campo data0, data1 non viene usato */
cmdval = ((virtAddr + i) << 8) | TRANSMITCHAR;
cmdval = (*(char *)(virtAddr + i) << 8) | TRANSMITCHAR;

if (*((char *)(virtAddr + i)) == '\0') {
break;
Expand All @@ -164,12 +167,10 @@ int write_to_terminal(unsigned int virtAddr, int len, unsigned int asid)
if ((status & TERMSTATMASK) != OKCHARTRANS) {
/* Rilascio la mutua esclusione */
SYSCALL(VERHOGEN, (unsigned int)&dev_sems[TERMOUT_SEMS][asid - 1], 0, 0);
LOG("QUAU");
return -dev_reg->transm_status;
}
}

LOG("YTYYYYY");
/* Rilascio la mutua esclusione */
SYSCALL(VERHOGEN, (unsigned int)&dev_sems[TERMOUT_SEMS][asid - 1], 0, 0);

Expand Down

0 comments on commit 2a6f7c1

Please sign in to comment.