mov cl, 8
mov ah, 0x0e
mov al, cl
int 0x10 ; print special character 8
db 0x48
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
unsigned short getea(unsigned char rmval, unsigned char mod) {
switch (mod) {
case 0:
if (rmval==0) return((*segptr<<4)+bx+si);
else if (rmval==1) return((*segptr<<4)+bx+di);
else if (rmval==2) return((*segptr<<4)+bp+si);
else if (rmval==3) return((*segptr<<4)+bp+di);
else if (rmval==4) return((*segptr<<4)+si);
else if (rmval==5) return((*segptr<<4)+di);
else if (rmval==6) return((*segptr<<4)+disp);
else if (rmval==7) return((*segptr<<4)+bx);
break;
case 1:
mov cl, PointTo
mov ah, 0x0e
mov al, cl
int 0x10
PointTo:
db 'H'
Things can assemble which will not run correctly. You're moving a 16-bit pointer into an 8-bit register, silently truncating the top 8 bits which the BIOS will then try and dereference. What are you even trying to achieve with that code?!