ack/plat/em/libsys/_lseek.e
David Given 7eaa235fd1 Bodge the ancient em monitor library into building as a libsys for the em22
plat. It's completely untested, but it builds and makes e.out executables.
2018-06-13 21:44:25 +09:00

34 lines
344 B
Plaintext

#
mes 2,EM_WSIZE,EM_PSIZE
exp $_lseek
pro $_lseek,0
lal 0
loi 4*EM_WSIZE
loc 19
mon
zeq *1
ste errno
#if EM_WSIZE==1
ldc -1
loc 2
loc 4
cii
#endif
#if EM_WSIZE==2
ldc -1
#endif
#if EM_WSIZE==4
loc -1
#endif
1
#if EM_WSIZE==1
ret 4*EM_WSIZE
#endif
#if EM_WSIZE==2
ret 2*EM_WSIZE
#endif
#if EM_WSIZE==4
ret EM_WSIZE
#endif
end