v8080: core changes to get to the point we can start init properly
authorAlan Cox <alan@linux.intel.com>
Sun, 10 Feb 2019 15:39:20 +0000 (15:39 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 10 Feb 2019 15:39:20 +0000 (15:39 +0000)
Kernel/lowlevel-8080.s
Kernel/usermem_std-8080.s

index 93765f7..c042e13 100644 (file)
@@ -57,8 +57,8 @@ unix_syscall_entry:
        di
        push b          ! Must preserve the frame pointer
        push d          ! will go away when we fix the ABI
-       lxi h,8         ! Find arguments on stack frame FIXME: work out
-                       ! right offset
+       lxi h,6         ! Find arguments on stack frame
+
        dad sp
        mov a,m
        sta U_DATA__U_CALLNO
@@ -128,7 +128,7 @@ unix_syscall_entry:
 unix_return:
        mov a,h
        ora l
-       jnz not_error
+       jz not_error
        stc
        jmp unix_pop
 not_error:
@@ -239,6 +239,7 @@ interrupt_handler:
        push d
        push h
        call platform_interrupt_all
+       jmp interrupt_pop                       !! FIXME
        ! Switch stacks
        lxi h,0
        dad sp
index 06131ea..1f396c5 100644 (file)
@@ -23,7 +23,7 @@ __uputc:
 .define __uputw
 
 __uputw:
-       lxi h,4
+       lxi h,2
        dad sp
        mov e,m
        inx h
@@ -31,12 +31,12 @@ __uputw:
        inx h
        mov a,m
        inx h
-       mov l,m
-       xchg
+       mov h,m
+       mov l,a
        call map_process_always
-       mov m,a
-       inx h
        mov m,e
+       inx h
+       mov m,d
        jp map_kernel
 
 .define __ugetc
@@ -48,6 +48,7 @@ __ugetc:
        push d
        call map_process_always
        mov e,m
+       mvi d,0
        jp map_kernel
 
 .define __ugetw