![]() jmp errorhandler_encodeRoman_inputTooBig continue_EncodeRoman: mov si, offset StringRam using SI as destination of roman numerals. call UnpackBCD cmp dh, 03 h jng continue_EncodeRoman roman numerals only go up to 3999. ROMAN NUMERALS MODULE EncodeRoman: takes a BCD value in AX and stores its Roman numeral equivalent in ram. Romanbuf: 8086 Assembly Main and Supporting Functions Test: mvi c,10 read string from consoleĬonvert: lxi b,romanbuf convert to roman Mkromandone: pop d remove temporary variable from stackĭbđ8h,0fch,'M',0 The value for each entryĭbėch,0fch,'CM',0 is stored already negatedĭbĐch,0feh,'D',0 so that it can be immediatelyĭbęch,0ffh,'C',0 This also has the convenientĭbĐa6h,0ffh,'XC',0 property of not having anyĭbĐceh,0ffh,'L',0 zero bytes except the stringĭbĐd8h,0ffh,'XL',0 and row terminators. Stringdone: pop h restore string location Stringinner: mov a,m copy string into target Stringouter: dcr d do we need to include one? Mkromandgt: mov a,m scan ahead to next entry ![]() On exit, all registers destroyed BC pointing at ![]() as a 0-terminated string starting at BC. Takes a 16-bit integer in HL, and stores it L R13,4(0,R13) restore previous savearea pointer IF CLI,1(R9),NE,C' ' THEN if roman(j)=' ' then DO WHILE=(C,R6,LE,=A(8)) do i=1 to hbound(nums)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |