From: Jonathan Campbell Date: Thu, 21 Apr 2016 13:59:46 +0000 (-0700) Subject: save/restore AX/BX when calling BIOS to get ROM font. X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=734addea4c40d2e7fb6470bdf51ce96343a25e59;p=16.git save/restore AX/BX when calling BIOS to get ROM font. --- diff --git a/src/lib/16text.c b/src/lib/16text.c index 95b307ef..81b71d98 100755 --- a/src/lib/16text.c +++ b/src/lib/16text.c @@ -31,6 +31,8 @@ static void getRomFontAddr(char fontNum, int index) { word fontOff; __asm { + PUSH AX + PUSH BX PUSH BP MOV AX, 0x1130 ;I can haz font info plz? MOV BH, fontNum ; where ur fontNum @@ -40,6 +42,8 @@ static void getRomFontAddr(char fontNum, int index) { POP BP ;u can haz ur frame back! MOV fontSeg, AX ;Storage MOV fontOff, BX ;Storage + POP BX + POP AX } romFonts[index].seg = fontSeg; romFonts[index].off = fontOff;