Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.asm.x86    |    Ahh, the lost art of x86 assembly    |    4,675 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,118 of 4,675    |
|    Frank Kotler to Richmond    |
|    Re: sys_read from stdin    |
|    28 Nov 17 13:29:09    |
      From: fbkotler@nospicedham.myfairpoint.net              Richmond wrote:       > I messed up again. 'charbuffer' is actually used by PWORD too. :(       >       > Here is my final code. I tried all sorts of things.       >       > GCHAR: push rax       > push rbx       > push rcx       > push rdx       > mov rsi, charbuffer_in ; buffer = address t       > mov rcx,rsi       > mov rdx, 0x1 ; number of bytes to read       > mov rax, 0x0 ; number for sys_read       > mov rbx, 0x0 ; From stdin       > mov rdi,rbx       > syscall       > MSPRINT "Byte read is "       > MOV AL,[charbuffer_in]       > MOV AH,0       > CALL PWORD       > pop rdx       > pop rcx       > pop rbx       > pop rax       > RET              Hi Richmond,              I'm still running a 32-bit system, so I can't help you much with 64-bit.       I can manage to do this in 32-bit. What you show here looks right (I       think) but I notice you're still pushing and popping registers that       would apply to 32-bit. Makes me wonder how you're turning off canonical       mode. Not file descriptor 2, I hope! If all else fails, show us that       part, too... although it should be obvious whether sys_read is waiting       for the "enter" key or not. Good luck!              Best,       Frank              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca