Code: Select all
int_33:
push 0xb800
pop es
mov di, [XY]
mov [es:di], ax
add ax, 2
mov [XY], di
ret
XY: ;-> OFFSET
dw 0
Code: Select all
int_33:
push 0xb800
pop es
mov di, [XY]
mov [es:di], ax
add ax, 2
mov [XY], di
ret
XY: ;-> OFFSET
dw 0
Well, wouldn't it be better if you break it off into two components...one X, another Y, and just increment Y for the carriage return?matias_beretta wrote:Hello
How can I put a carriage return?Code: Select all
int_33: push 0xb800 pop es mov di, [XY] mov [es:di], ax add ax, 2 mov [XY], di ret XY: ;-> OFFSET dw 0
1) Chill...not everyone is on the boards 24/7...sheesh.matias_beretta wrote:please answer!!!!!
Code: Select all
xor edx, edx ; need edx = 0
mov eax, [XY] ; number to divide
mov ebx, 160 ; divide by this
div ebx ; divides the qword edx:eax by ebx
sub [XY], edx ; modulus (remainder) gets stored in edx
only if you have a very old CPU...but as I said -- the DIV opcode is VERY SLOW. Usually 20 times slower than any other opcode on the machine. You do not want to use it often if you can help it at all.