|
|
| Посл.отвђт | Сообщенiе |
|
|
Дата: Май 7, 2004 22:35:32 из Юрова: если делитель размером в байт в моем случае 0ah, то делимое в ax у меня 1235h. В итоге частное в ah, остаток в al. Делю на citezen, частное 1d2 это явно больше байта и в ah точно не залезет, как быть? Где туплю? |
|
|
Дата: Май 7, 2004 22:41:54 Если правильно помню, то если делимое - ax, то частное - в ax, а остаток - в dx. А что такое citezen? |
|
|
Дата: Май 7, 2004 23:14:06 А что такое citezen? Электронный аббак :) Ты указал на расклад когда делитель слово, а у меня байт 0ah! |
|
|
Дата: Май 7, 2004 23:15:27 · Поправил: PavPS А что особенного. Вовсе не тупишь. Все ошибаются. Из "Art of assembly" There is one other catch to the 80x86’s divide instructions: you can get a fatal error when using this instruction. First, of course, you can attempt to divide a value by zero. Furthermore, the quotient may be too large to fit into the eax, ax, or al register. For example, the 16/8 division “8000h / 2” produces the quotient 4000h with a remainder of zero. 4000h will not fit into eight bits. If this happens, or you attempt to divide by zero, the 80x86 will generate an int 0 trap. This usually means BIOS will print “division by zero” or “divide error” and abort your program. If this happens to you, chances are you didn’t sign or zero extend your numerator before executing the division operation. Since this error will cause your program to crash, you should be very careful about the values you select when using division. У меня такое было. Сразу же перезагрузка. |
|
|
Дата: Май 7, 2004 23:17:29 Так надо юзать Англо-Русский словарь и постараться не вспомнить СПлина :( |
|
|
Дата: Май 8, 2004 10:45:12 Проблему решил я делал: mov bl,10d div bl а стал: mov bx,10d div bx получается как описывает Anonimka |
|
Powered by miniBB 1.6 © 2001-2002
Время загрузки страницы (сек.): 0.086 |