diff --git a/notes.txt b/notes.txt index c064143..666c3e8 100644 --- a/notes.txt +++ b/notes.txt @@ -194,6 +194,19 @@ e07-08 e08-* - I used spaces to line up columns, not tabs. +e08-02 + - the bread function is missing a branch when copying data from + kernel memory (r5) to user memory (r2). I added a branch: + 1: / r5 points to beginning of data in I/O buffer, r2 points to beginning + / of users data + movb (r5)+,(r2)+ / move data from the I/O buffer + dec r3 / to the user's area in core starting at u.base + bne 1b + ^^^^^^^^^^^ + tst u.count / done + beq 1f / yes, return + without this it only copies one byte to userland. + -------------------- e09-01 - I'm using tabs between opcode and operands now diff --git a/pages/e08-02 b/pages/e08-02 index b208f9c..adbd90d 100644 --- a/pages/e08-02 +++ b/pages/e08-02 @@ -28,6 +28,7 @@ / of users data movb (r5)+,(r2)+ / move data from the I/O buffer dec r3 / to the user's area in core starting at u.base + bne 1b tst u.count / done beq 1f / yes, return tst -(r0) / no, point r0 to the argument again