mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-12-19 15:29:48 +00:00
Implemented 16bit signed division.
This commit is contained in:
parent
1fd0cd6874
commit
3eb08597cf
@ -292,6 +292,8 @@ public class AsmFragmentInstanceSpec {
|
||||
return "pbs";
|
||||
} else if(SymbolType.isWord(elementType)) {
|
||||
return "pwu";
|
||||
} else if(SymbolType.isSWord(elementType)) {
|
||||
return "pws";
|
||||
} else {
|
||||
throw new RuntimeException("Not implemented " + type);
|
||||
}
|
||||
|
@ -214,6 +214,18 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
mapSToU.put("vwsc1", "vwuc1");
|
||||
mapSToU.put("vwsc2", "vwuc2");
|
||||
mapSToU.put("vwsc3", "vwuc3");
|
||||
mapSToU.put("pbsz1", "pbuz1");
|
||||
mapSToU.put("pbsz2", "pbuz2");
|
||||
mapSToU.put("pbsz3", "pbuz3");
|
||||
mapSToU.put("pbsc1", "pbuc1");
|
||||
mapSToU.put("pbsc2", "pbuc2");
|
||||
mapSToU.put("pbsc3", "pbuc3");
|
||||
mapSToU.put("pwsz1", "pwuz1");
|
||||
mapSToU.put("pwsz2", "pwuz2");
|
||||
mapSToU.put("pwsz3", "pwuz3");
|
||||
mapSToU.put("pwsc1", "pwuc1");
|
||||
mapSToU.put("pwsc2", "pwuc2");
|
||||
mapSToU.put("pwsc3", "pwuc3");
|
||||
|
||||
// AA/XX/YY/Z1 is an RValue
|
||||
String rvalAa = ".*=.*aa.*|.*_.*aa.*|...aa_(lt|gt|le|ge|eq|neq)_.*";
|
||||
@ -360,7 +372,6 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
// Replace Z3 with XX (only one)
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*vb.)z3(.*)", lvalZ3+"|"+twoZ3+"|"+rvalXx, "ldx {z3}", "$1xx$2", null, mapZ4));
|
||||
|
||||
|
||||
// Rewrite comparisons < to >
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(.*)_gt_(.*)_then_(.*)", null, null, "$2_lt_$1_then_$3", null, null));
|
||||
// Rewrite comparisons > to <
|
||||
@ -472,13 +483,11 @@ class AsmFragmentTemplateSynthesisRule {
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("pb(.)c1_derefidx_vbuxx_(lt|gt|le|ge|eq|neq)_(.*c1.*)", rvalAa, "lda {c1},x", "vb$1aa_$2_$3", null, null));
|
||||
|
||||
// Use unsigned ASM to synthesize signed ASM ( ...vbs... -> ...vbu... )
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)_(eq|neq)_(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)=(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)=(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)_(plus|band|bxor|bor)_(vbsz.|csoby.|vbsaa|vbsxx|vbsyy)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)=_(inc|dec)_(vbsz.|vbsc.|vbsaa|vbsxx|vbsyy)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vwsz.|vwsc.)_(eq|neq)_(vwsz.|vwsc.)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vwsz.)=(vwsz.|vwsc.)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.sz.)=(v.s..)_(band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)_(eq|neq)_(v.s..)_then_(.*)", null, null, "$1_$2_$3_then_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)", null, null, "$1=$2", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(v.s..)_(plus|band|bxor|bor)_(v.s..)", null, null, "$1=$2_$3_$4", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=(p.s..)_derefidx_(vbu..)", null, null, "$1=$2_derefidx_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(v.s..)=_(inc|dec)_(v.s..)", null, null, "$1=_$2_$3", null, mapSToU));
|
||||
synths.add(new AsmFragmentTemplateSynthesisRule("(vbuz.|vbuaa|vbuxx|vbuyy)=_(lo|hi)_vws(z.|c.)", null, null, "$1=_$2_vwu$3", null, mapSToU));
|
||||
|
||||
// Use constant word ASM to synthesize unsigned constant byte ASM ( ...vb.c... -> vw.c... )
|
||||
|
@ -26,41 +26,6 @@ byte div8u(byte dividend, byte divisor) {
|
||||
return quotient;
|
||||
}
|
||||
|
||||
// Remainder after signed 8 bit division
|
||||
signed byte rem8s = 0;
|
||||
|
||||
// Perform division on two signed 8-bit numbers
|
||||
// Returns dividend/divisor.
|
||||
// The remainder will be set into the global variable rem8s.
|
||||
// Implemented using simple binary division
|
||||
// Follows the C99 standard by truncating toward zero on negative results.
|
||||
// See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf section 6.5.5
|
||||
signed byte div8s(signed byte dividend, signed byte divisor) {
|
||||
byte neg = 0;
|
||||
byte dividendb = 0;
|
||||
if(dividend<0) {
|
||||
dividendb = (byte)-dividend;
|
||||
neg = 1;
|
||||
} else {
|
||||
dividendb = (byte)dividend;
|
||||
}
|
||||
byte divisorb = 0;
|
||||
if(divisor<0) {
|
||||
divisorb = (byte)-divisor;
|
||||
neg = neg ^ 1;
|
||||
} else {
|
||||
divisorb = (byte)divisor;
|
||||
}
|
||||
byte resultb = div8u(dividendb, divisorb);
|
||||
if(neg==0) {
|
||||
rem8s = (signed byte)rem8u;
|
||||
return (signed byte)resultb;
|
||||
} else {
|
||||
rem8s = -(signed byte)rem8u;
|
||||
return -(signed byte)resultb;
|
||||
}
|
||||
}
|
||||
|
||||
// Remainder after unsigned 16-bit division
|
||||
word rem16u = 0;
|
||||
|
||||
@ -85,4 +50,74 @@ word div16u(word dividend, word divisor) {
|
||||
}
|
||||
rem16u = rem;
|
||||
return quotient;
|
||||
}
|
||||
}
|
||||
|
||||
// Remainder after signed 8 bit division
|
||||
signed byte rem8s = 0;
|
||||
|
||||
// Perform division on two signed 8-bit numbers
|
||||
// Returns dividend/divisor.
|
||||
// The remainder will be set into the global variable rem8s.
|
||||
// Implemented using simple binary division
|
||||
// Follows the C99 standard by truncating toward zero on negative results.
|
||||
// See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf section 6.5.5
|
||||
signed byte div8s(signed byte dividend, signed byte divisor) {
|
||||
byte neg = 0;
|
||||
byte dividendu = 0;
|
||||
if(dividend<0) {
|
||||
dividendu = (byte)-dividend;
|
||||
neg = 1;
|
||||
} else {
|
||||
dividendu = (byte)dividend;
|
||||
}
|
||||
byte divisoru = 0;
|
||||
if(divisor<0) {
|
||||
divisoru = (byte)-divisor;
|
||||
neg = neg ^ 1;
|
||||
} else {
|
||||
divisoru = (byte)divisor;
|
||||
}
|
||||
byte resultu = div8u(dividendu, divisoru);
|
||||
if(neg==0) {
|
||||
rem8s = (signed byte)rem8u;
|
||||
return (signed byte)resultu;
|
||||
} else {
|
||||
rem8s = -(signed byte)rem8u;
|
||||
return -(signed byte)resultu;
|
||||
}
|
||||
}
|
||||
|
||||
// Remainder after signed 16 bit division
|
||||
signed word rem16s = 0;
|
||||
|
||||
// Perform division on two signed 16-bit numbers
|
||||
// Returns dividend/divisor.
|
||||
// The remainder will be set into the global variable rem16s.
|
||||
// Implemented using simple binary division
|
||||
// Follows the C99 standard by truncating toward zero on negative results.
|
||||
// See http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf section 6.5.5
|
||||
signed word div16s(signed word dividend, signed word divisor) {
|
||||
byte neg = 0;
|
||||
word dividendu = 0;
|
||||
if(dividend<0) {
|
||||
dividendu = (word)-dividend;
|
||||
neg = 1;
|
||||
} else {
|
||||
dividendu = (word)dividend;
|
||||
}
|
||||
word divisoru = 0;
|
||||
if(divisor<0) {
|
||||
divisoru = (word)-divisor;
|
||||
neg = neg ^ 1;
|
||||
} else {
|
||||
divisoru = (word)divisor;
|
||||
}
|
||||
word resultu = div16u(dividendu, divisoru);
|
||||
if(neg==0) {
|
||||
rem16s = (signed word)rem16u;
|
||||
return (signed word)resultu;
|
||||
} else {
|
||||
rem16s = -(signed word)rem16u;
|
||||
return -(signed word)resultu;
|
||||
}
|
||||
}
|
||||
|
@ -4,27 +4,10 @@ import "division.kc"
|
||||
|
||||
void main() {
|
||||
print_cls();
|
||||
test_8s();
|
||||
test_8u();
|
||||
test_16u();
|
||||
}
|
||||
|
||||
void test_16u() {
|
||||
word[] dividends = { $ffff, $ffff, $ffff, $ffff, $ffff, $ffff};
|
||||
word[] divisors = { 5, 7, 11, 13, 17, 19 };
|
||||
for( byte i=0;i!=12;i=i+2) {
|
||||
word dividend = dividends[i];
|
||||
word divisor = divisors[i];
|
||||
word res = div16u(dividend, divisor);
|
||||
print_word(dividend);
|
||||
print_str(" / @");
|
||||
print_word(divisor);
|
||||
print_str(" = @");
|
||||
print_word(res);
|
||||
print_str(" @");
|
||||
print_word(rem16u);
|
||||
print_ln();
|
||||
}
|
||||
test_8s();
|
||||
test_16s();
|
||||
}
|
||||
|
||||
void test_8u() {
|
||||
@ -46,6 +29,24 @@ void test_8u() {
|
||||
}
|
||||
}
|
||||
|
||||
void test_16u() {
|
||||
word[] dividends = { $ffff, $ffff, $ffff, $ffff, $ffff, $ffff};
|
||||
word[] divisors = { 5, 7, 11, 13, 17, 19 };
|
||||
for( byte i=0;i!=12;i=i+2) {
|
||||
word dividend = dividends[i];
|
||||
word divisor = divisors[i];
|
||||
word res = div16u(dividend, divisor);
|
||||
print_word(dividend);
|
||||
print_str(" / @");
|
||||
print_word(divisor);
|
||||
print_str(" = @");
|
||||
print_word(res);
|
||||
print_str(" @");
|
||||
print_word(rem16u);
|
||||
print_ln();
|
||||
}
|
||||
}
|
||||
|
||||
void test_8s() {
|
||||
signed byte[] dividends = { 127, -127, -127, 127, 127, 127};
|
||||
signed byte[] divisors = { 5, 7, -11, -13, 17, 19 };
|
||||
@ -63,3 +64,21 @@ void test_8s() {
|
||||
print_ln();
|
||||
}
|
||||
}
|
||||
|
||||
void test_16s() {
|
||||
signed word[] dividends = { $7fff, $7fff, -$7fff, -$7fff, $7fff, -$7fff};
|
||||
signed word[] divisors = { 5, -7, 11, -13, -17, 19 };
|
||||
for( byte i=0;i!=12;i=i+2) {
|
||||
signed word dividend = dividends[i];
|
||||
signed word divisor = divisors[i];
|
||||
signed word res = div16s(dividend, divisor);
|
||||
print_sword(dividend);
|
||||
print_str(" / @");
|
||||
print_sword(divisor);
|
||||
print_str(" = @");
|
||||
print_sword(res);
|
||||
print_str(" @");
|
||||
print_sword(rem16s);
|
||||
print_ln();
|
||||
}
|
||||
}
|
||||
|
@ -2,22 +2,477 @@
|
||||
:BasicUpstart(main)
|
||||
.pc = $80d "Program"
|
||||
.label SCREEN = $400
|
||||
.label char_cursor = 8
|
||||
.label line_cursor = 3
|
||||
.label rem8s = $e
|
||||
.label rem16u = $a
|
||||
.label char_cursor = $a
|
||||
.label line_cursor = 5
|
||||
.label rem16u = 3
|
||||
.label rem16s = 3
|
||||
jsr main
|
||||
main: {
|
||||
jsr print_cls
|
||||
jsr test_8s
|
||||
jsr test_8u
|
||||
jsr test_16u
|
||||
jsr test_8s
|
||||
jsr test_16s
|
||||
rts
|
||||
}
|
||||
test_16s: {
|
||||
.label dividend = 7
|
||||
.label divisor = $14
|
||||
.label res = $e
|
||||
.label i = 2
|
||||
lda #0
|
||||
sta rem16s
|
||||
sta rem16s+1
|
||||
sta i
|
||||
b1:
|
||||
ldy i
|
||||
lda dividends,y
|
||||
sta dividend
|
||||
lda dividends+1,y
|
||||
sta dividend+1
|
||||
lda divisors,y
|
||||
sta divisor
|
||||
lda divisors+1,y
|
||||
sta divisor+1
|
||||
lda divisor
|
||||
sta div16s.divisor
|
||||
lda divisor+1
|
||||
sta div16s.divisor+1
|
||||
jsr div16s
|
||||
lda line_cursor
|
||||
sta char_cursor
|
||||
lda line_cursor+1
|
||||
sta char_cursor+1
|
||||
jsr print_sword
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda divisor
|
||||
sta print_sword.w
|
||||
lda divisor+1
|
||||
sta print_sword.w+1
|
||||
jsr print_sword
|
||||
lda #<str1
|
||||
sta print_str.str
|
||||
lda #>str1
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda res
|
||||
sta print_sword.w
|
||||
lda res+1
|
||||
sta print_sword.w+1
|
||||
jsr print_sword
|
||||
lda #<str2
|
||||
sta print_str.str
|
||||
lda #>str2
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda rem16s
|
||||
sta print_sword.w
|
||||
lda rem16s+1
|
||||
sta print_sword.w+1
|
||||
jsr print_sword
|
||||
jsr print_ln
|
||||
lda #2
|
||||
clc
|
||||
adc i
|
||||
sta i
|
||||
cmp #$c
|
||||
beq !b1+
|
||||
jmp b1
|
||||
!b1:
|
||||
rts
|
||||
str: .text " / @"
|
||||
str1: .text " = @"
|
||||
str2: .text " @"
|
||||
dividends: .word $7fff, $7fff, -$7fff, -$7fff, $7fff, -$7fff
|
||||
divisors: .word 5, -7, $b, -$d, -$11, $13
|
||||
}
|
||||
print_ln: {
|
||||
b1:
|
||||
lda line_cursor
|
||||
clc
|
||||
adc #$28
|
||||
sta line_cursor
|
||||
bcc !+
|
||||
inc line_cursor+1
|
||||
!:
|
||||
lda line_cursor+1
|
||||
cmp char_cursor+1
|
||||
bcc b1
|
||||
bne !+
|
||||
lda line_cursor
|
||||
cmp char_cursor
|
||||
bcc b1
|
||||
!:
|
||||
rts
|
||||
}
|
||||
print_sword: {
|
||||
.label w = 7
|
||||
lda w+1
|
||||
bpl b1
|
||||
lda #'-'
|
||||
jsr print_char
|
||||
sec
|
||||
lda w
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta w
|
||||
lda w+1
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta w+1
|
||||
b1:
|
||||
jsr print_word
|
||||
rts
|
||||
}
|
||||
print_word: {
|
||||
.label w = 7
|
||||
lda w+1
|
||||
sta print_byte.b
|
||||
jsr print_byte
|
||||
lda w
|
||||
sta print_byte.b
|
||||
jsr print_byte
|
||||
rts
|
||||
}
|
||||
print_byte: {
|
||||
.label b = 9
|
||||
lda b
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda hextab,y
|
||||
jsr print_char
|
||||
lda #$f
|
||||
and b
|
||||
tay
|
||||
lda hextab,y
|
||||
jsr print_char
|
||||
rts
|
||||
hextab: .text "0123456789abcdef"
|
||||
}
|
||||
print_char: {
|
||||
ldy #0
|
||||
sta (char_cursor),y
|
||||
inc char_cursor
|
||||
bne !+
|
||||
inc char_cursor+1
|
||||
!:
|
||||
rts
|
||||
}
|
||||
print_str: {
|
||||
.label str = 7
|
||||
b1:
|
||||
ldy #0
|
||||
lda (str),y
|
||||
cmp #'@'
|
||||
bne b2
|
||||
rts
|
||||
b2:
|
||||
ldy #0
|
||||
lda (str),y
|
||||
sta (char_cursor),y
|
||||
inc char_cursor
|
||||
bne !+
|
||||
inc char_cursor+1
|
||||
!:
|
||||
inc str
|
||||
bne !+
|
||||
inc str+1
|
||||
!:
|
||||
jmp b1
|
||||
}
|
||||
div16s: {
|
||||
.label _2 = $a
|
||||
.label _7 = $c
|
||||
.label resultu = $e
|
||||
.label return = $e
|
||||
.label dividend = 7
|
||||
.label divisor = $c
|
||||
.label dividendu = $a
|
||||
.label divisoru = $c
|
||||
lda dividend+1
|
||||
bpl b16
|
||||
sec
|
||||
lda dividend
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta _2
|
||||
lda dividend+1
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta _2+1
|
||||
ldy #1
|
||||
b2:
|
||||
lda divisor+1
|
||||
bpl b4
|
||||
sec
|
||||
lda _7
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta _7
|
||||
lda _7+1
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta _7+1
|
||||
tya
|
||||
eor #1
|
||||
tay
|
||||
b4:
|
||||
jsr div16u
|
||||
cpy #0
|
||||
bne b5
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
sec
|
||||
lda rem16s
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta rem16s
|
||||
lda rem16s+1
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta rem16s+1
|
||||
sec
|
||||
lda return
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta return
|
||||
lda return+1
|
||||
eor #$ff
|
||||
adc #0
|
||||
sta return+1
|
||||
jmp breturn
|
||||
b16:
|
||||
lda dividend
|
||||
sta dividendu
|
||||
lda dividend+1
|
||||
sta dividendu+1
|
||||
ldy #0
|
||||
jmp b2
|
||||
}
|
||||
div16u: {
|
||||
.label rem = 3
|
||||
.label dividend = $a
|
||||
.label quotient = $e
|
||||
.label return = $e
|
||||
.label divisor = $c
|
||||
ldx #0
|
||||
txa
|
||||
sta quotient
|
||||
sta quotient+1
|
||||
sta rem
|
||||
sta rem+1
|
||||
b1:
|
||||
asl rem
|
||||
rol rem+1
|
||||
lda dividend+1
|
||||
and #$80
|
||||
cmp #0
|
||||
beq b2
|
||||
inc rem
|
||||
bne !+
|
||||
inc rem+1
|
||||
!:
|
||||
b2:
|
||||
asl dividend
|
||||
rol dividend+1
|
||||
asl quotient
|
||||
rol quotient+1
|
||||
lda rem+1
|
||||
cmp divisor+1
|
||||
bcc b3
|
||||
bne !+
|
||||
lda rem
|
||||
cmp divisor
|
||||
bcc b3
|
||||
!:
|
||||
inc quotient
|
||||
bne !+
|
||||
inc quotient+1
|
||||
!:
|
||||
lda rem
|
||||
sec
|
||||
sbc divisor
|
||||
sta rem
|
||||
lda rem+1
|
||||
sbc divisor+1
|
||||
sta rem+1
|
||||
b3:
|
||||
inx
|
||||
cpx #$10
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
test_8s: {
|
||||
.label dividend = 9
|
||||
.label divisor = $16
|
||||
.label res = $10
|
||||
.label i = 2
|
||||
lda #0
|
||||
tax
|
||||
sta i
|
||||
b1:
|
||||
ldy i
|
||||
lda dividends,y
|
||||
sta dividend
|
||||
lda divisors,y
|
||||
sta divisor
|
||||
lda dividend
|
||||
ldx divisor
|
||||
jsr div8s
|
||||
sta res
|
||||
lda line_cursor
|
||||
sta char_cursor
|
||||
lda line_cursor+1
|
||||
sta char_cursor+1
|
||||
jsr print_sbyte
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda divisor
|
||||
sta print_sbyte.b
|
||||
jsr print_sbyte
|
||||
lda #<str1
|
||||
sta print_str.str
|
||||
lda #>str1
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda res
|
||||
sta print_sbyte.b
|
||||
jsr print_sbyte
|
||||
lda #<str2
|
||||
sta print_str.str
|
||||
lda #>str2
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
stx print_sbyte.b
|
||||
jsr print_sbyte
|
||||
jsr print_ln
|
||||
inc i
|
||||
lda i
|
||||
cmp #6
|
||||
bne b1
|
||||
rts
|
||||
str: .text " / @"
|
||||
str1: .text " = @"
|
||||
str2: .text " @"
|
||||
dividends: .byte $7f, -$7f, -$7f, $7f, $7f, $7f
|
||||
divisors: .byte 5, 7, -$b, -$d, $11, $13
|
||||
}
|
||||
print_sbyte: {
|
||||
.label b = 9
|
||||
lda b
|
||||
cmp #0
|
||||
bpl b1
|
||||
lda #'-'
|
||||
jsr print_char
|
||||
lda b
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
sta b
|
||||
b1:
|
||||
jsr print_byte
|
||||
rts
|
||||
}
|
||||
div8s: {
|
||||
.label neg = $10
|
||||
cmp #0
|
||||
bpl b16
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
tay
|
||||
lda #1
|
||||
sta neg
|
||||
b2:
|
||||
cpx #0
|
||||
bpl b4
|
||||
txa
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
tax
|
||||
lda neg
|
||||
eor #1
|
||||
sta neg
|
||||
b4:
|
||||
sty div8u.dividend
|
||||
stx div8u.divisor
|
||||
jsr div8u
|
||||
lda div8u.return
|
||||
tay
|
||||
lda neg
|
||||
bne b5
|
||||
tya
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
txa
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
tax
|
||||
tya
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
jmp breturn
|
||||
b16:
|
||||
tay
|
||||
lda #0
|
||||
sta neg
|
||||
jmp b2
|
||||
}
|
||||
div8u: {
|
||||
.label dividend = $12
|
||||
.label quotient = $13
|
||||
.label return = $13
|
||||
.label divisor = $11
|
||||
ldx #0
|
||||
txa
|
||||
sta quotient
|
||||
tay
|
||||
b1:
|
||||
tya
|
||||
asl
|
||||
tay
|
||||
lda #$80
|
||||
and dividend
|
||||
cmp #0
|
||||
beq b2
|
||||
iny
|
||||
b2:
|
||||
asl dividend
|
||||
asl quotient
|
||||
cpy divisor
|
||||
bcc b3
|
||||
inc quotient
|
||||
tya
|
||||
sec
|
||||
sbc divisor
|
||||
tay
|
||||
b3:
|
||||
inx
|
||||
cpx #8
|
||||
bne b1
|
||||
tya
|
||||
tax
|
||||
rts
|
||||
}
|
||||
test_16u: {
|
||||
.label dividend = 5
|
||||
.label divisor = $12
|
||||
.label res = $c
|
||||
.label dividend = 7
|
||||
.label divisor = $c
|
||||
.label res = $e
|
||||
.label i = 2
|
||||
lda #0
|
||||
sta rem16u
|
||||
@ -68,9 +523,9 @@ test_16u: {
|
||||
lda #>str2
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda div16u.rem
|
||||
lda rem16u
|
||||
sta print_word.w
|
||||
lda div16u.rem+1
|
||||
lda rem16u+1
|
||||
sta print_word.w+1
|
||||
jsr print_word
|
||||
jsr print_ln
|
||||
@ -79,9 +534,7 @@ test_16u: {
|
||||
adc i
|
||||
sta i
|
||||
cmp #$c
|
||||
beq !b1+
|
||||
jmp b1
|
||||
!b1:
|
||||
bne b1
|
||||
rts
|
||||
str: .text " / @"
|
||||
str1: .text " = @"
|
||||
@ -89,143 +542,21 @@ test_16u: {
|
||||
dividends: .word $ffff, $ffff, $ffff, $ffff, $ffff, $ffff
|
||||
divisors: .word 5, 7, $b, $d, $11, $13
|
||||
}
|
||||
print_ln: {
|
||||
b1:
|
||||
lda line_cursor
|
||||
clc
|
||||
adc #$28
|
||||
test_8u: {
|
||||
.label dividend = 9
|
||||
.label divisor = $11
|
||||
.label res = $10
|
||||
.label i = 2
|
||||
lda #<SCREEN
|
||||
sta line_cursor
|
||||
bcc !+
|
||||
inc line_cursor+1
|
||||
!:
|
||||
lda line_cursor+1
|
||||
cmp char_cursor+1
|
||||
bcc b1
|
||||
bne !+
|
||||
lda line_cursor
|
||||
cmp char_cursor
|
||||
bcc b1
|
||||
!:
|
||||
rts
|
||||
}
|
||||
print_word: {
|
||||
.label w = 5
|
||||
lda w+1
|
||||
sta print_byte.b
|
||||
jsr print_byte
|
||||
lda w
|
||||
sta print_byte.b
|
||||
jsr print_byte
|
||||
rts
|
||||
}
|
||||
print_byte: {
|
||||
.label b = 7
|
||||
lda b
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
lsr
|
||||
tay
|
||||
lda hextab,y
|
||||
jsr print_char
|
||||
lda #$f
|
||||
and b
|
||||
tay
|
||||
lda hextab,y
|
||||
jsr print_char
|
||||
rts
|
||||
hextab: .text "0123456789abcdef"
|
||||
}
|
||||
print_char: {
|
||||
ldy #0
|
||||
sta (char_cursor),y
|
||||
inc char_cursor
|
||||
bne !+
|
||||
inc char_cursor+1
|
||||
!:
|
||||
rts
|
||||
}
|
||||
print_str: {
|
||||
.label str = 5
|
||||
b1:
|
||||
ldy #0
|
||||
lda (str),y
|
||||
cmp #'@'
|
||||
bne b2
|
||||
rts
|
||||
b2:
|
||||
ldy #0
|
||||
lda (str),y
|
||||
sta (char_cursor),y
|
||||
inc char_cursor
|
||||
bne !+
|
||||
inc char_cursor+1
|
||||
!:
|
||||
inc str
|
||||
bne !+
|
||||
inc str+1
|
||||
!:
|
||||
jmp b1
|
||||
}
|
||||
div16u: {
|
||||
.label rem = $a
|
||||
.label dividend = 8
|
||||
.label quotient = $c
|
||||
.label return = $c
|
||||
.label divisor = $12
|
||||
lda #>SCREEN
|
||||
sta line_cursor+1
|
||||
lda #<SCREEN
|
||||
sta char_cursor
|
||||
lda #>SCREEN
|
||||
sta char_cursor+1
|
||||
ldx #0
|
||||
txa
|
||||
sta quotient
|
||||
sta quotient+1
|
||||
sta rem
|
||||
sta rem+1
|
||||
b1:
|
||||
asl rem
|
||||
rol rem+1
|
||||
lda dividend+1
|
||||
and #$80
|
||||
cmp #0
|
||||
beq b2
|
||||
inc rem
|
||||
bne !+
|
||||
inc rem+1
|
||||
!:
|
||||
b2:
|
||||
asl dividend
|
||||
rol dividend+1
|
||||
asl quotient
|
||||
rol quotient+1
|
||||
lda rem+1
|
||||
cmp divisor+1
|
||||
bcc b3
|
||||
bne !+
|
||||
lda rem
|
||||
cmp divisor
|
||||
bcc b3
|
||||
!:
|
||||
inc quotient
|
||||
bne !+
|
||||
inc quotient+1
|
||||
!:
|
||||
lda rem
|
||||
sec
|
||||
sbc divisor
|
||||
sta rem
|
||||
lda rem+1
|
||||
sbc divisor+1
|
||||
sta rem+1
|
||||
b3:
|
||||
inx
|
||||
cpx #$10
|
||||
bne b1
|
||||
rts
|
||||
}
|
||||
test_8u: {
|
||||
.label dividend = 7
|
||||
.label divisor = $e
|
||||
.label res = $f
|
||||
.label i = 2
|
||||
lda #0
|
||||
sta i
|
||||
b1:
|
||||
ldy i
|
||||
@ -238,10 +569,6 @@ test_8u: {
|
||||
jsr div8u
|
||||
lda div8u.return
|
||||
sta res
|
||||
lda line_cursor
|
||||
sta char_cursor
|
||||
lda line_cursor+1
|
||||
sta char_cursor+1
|
||||
jsr print_byte
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
@ -270,106 +597,6 @@ test_8u: {
|
||||
inc i
|
||||
lda i
|
||||
cmp #6
|
||||
bne b1
|
||||
rts
|
||||
str: .text " / @"
|
||||
str1: .text " = @"
|
||||
str2: .text " @"
|
||||
dividends: .byte $ff, $ff, $ff, $ff, $ff, $ff
|
||||
divisors: .byte 5, 7, $b, $d, $11, $13
|
||||
}
|
||||
div8u: {
|
||||
.label dividend = $f
|
||||
.label quotient = $10
|
||||
.label return = $10
|
||||
.label divisor = $e
|
||||
ldx #0
|
||||
txa
|
||||
sta quotient
|
||||
tay
|
||||
b1:
|
||||
tya
|
||||
asl
|
||||
tay
|
||||
lda #$80
|
||||
and dividend
|
||||
cmp #0
|
||||
beq b2
|
||||
iny
|
||||
b2:
|
||||
asl dividend
|
||||
asl quotient
|
||||
cpy divisor
|
||||
bcc b3
|
||||
inc quotient
|
||||
tya
|
||||
sec
|
||||
sbc divisor
|
||||
tay
|
||||
b3:
|
||||
inx
|
||||
cpx #8
|
||||
bne b1
|
||||
tya
|
||||
tax
|
||||
rts
|
||||
}
|
||||
test_8s: {
|
||||
.label dividend = 7
|
||||
.label divisor = $14
|
||||
.label res = $f
|
||||
.label i = 2
|
||||
lda #<SCREEN
|
||||
sta line_cursor
|
||||
lda #>SCREEN
|
||||
sta line_cursor+1
|
||||
lda #<SCREEN
|
||||
sta char_cursor
|
||||
lda #>SCREEN
|
||||
sta char_cursor+1
|
||||
lda #0
|
||||
sta rem8s
|
||||
tax
|
||||
sta i
|
||||
b1:
|
||||
ldy i
|
||||
lda dividends,y
|
||||
sta dividend
|
||||
lda divisors,y
|
||||
sta divisor
|
||||
lda dividend
|
||||
ldx divisor
|
||||
jsr div8s
|
||||
sta res
|
||||
jsr print_sbyte
|
||||
lda #<str
|
||||
sta print_str.str
|
||||
lda #>str
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda divisor
|
||||
sta print_sbyte.b
|
||||
jsr print_sbyte
|
||||
lda #<str1
|
||||
sta print_str.str
|
||||
lda #>str1
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda res
|
||||
sta print_sbyte.b
|
||||
jsr print_sbyte
|
||||
lda #<str2
|
||||
sta print_str.str
|
||||
lda #>str2
|
||||
sta print_str.str+1
|
||||
jsr print_str
|
||||
lda rem8s
|
||||
sta print_sbyte.b
|
||||
jsr print_sbyte
|
||||
jsr print_ln
|
||||
inc i
|
||||
lda i
|
||||
cmp #6
|
||||
bne b12
|
||||
rts
|
||||
b12:
|
||||
@ -381,74 +608,8 @@ test_8s: {
|
||||
str: .text " / @"
|
||||
str1: .text " = @"
|
||||
str2: .text " @"
|
||||
dividends: .byte $7f, -$7f, -$7f, $7f, $7f, $7f
|
||||
divisors: .byte 5, 7, -$b, -$d, $11, $13
|
||||
}
|
||||
print_sbyte: {
|
||||
.label b = 7
|
||||
lda b
|
||||
cmp #0
|
||||
bpl b1
|
||||
lda #'-'
|
||||
jsr print_char
|
||||
lda b
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
sta b
|
||||
b1:
|
||||
jsr print_byte
|
||||
rts
|
||||
}
|
||||
div8s: {
|
||||
.label neg = $11
|
||||
cmp #0
|
||||
bpl b16
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
tay
|
||||
lda #1
|
||||
sta neg
|
||||
b2:
|
||||
cpx #0
|
||||
bpl b4
|
||||
txa
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
tax
|
||||
lda neg
|
||||
eor #1
|
||||
sta neg
|
||||
b4:
|
||||
sty div8u.dividend
|
||||
stx div8u.divisor
|
||||
jsr div8u
|
||||
lda div8u.return
|
||||
tay
|
||||
lda neg
|
||||
bne b5
|
||||
tya
|
||||
stx rem8s
|
||||
breturn:
|
||||
rts
|
||||
b5:
|
||||
txa
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
sta rem8s
|
||||
tya
|
||||
eor #$ff
|
||||
clc
|
||||
adc #1
|
||||
jmp breturn
|
||||
b16:
|
||||
tay
|
||||
lda #0
|
||||
sta neg
|
||||
jmp b2
|
||||
dividends: .byte $ff, $ff, $ff, $ff, $ff, $ff
|
||||
divisors: .byte 5, 7, $b, $d, $11, $13
|
||||
}
|
||||
print_cls: {
|
||||
.label sc = 3
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,21 +1,60 @@
|
||||
(label) @15
|
||||
(label) @17
|
||||
(label) @begin
|
||||
(label) @end
|
||||
(byte*) SCREEN
|
||||
(const byte*) SCREEN#0 SCREEN = ((byte*))(word/signed word/dword/signed dword) 1024
|
||||
(byte*) char_cursor
|
||||
(byte*) char_cursor#1 char_cursor zp ZP_WORD:8 101.0
|
||||
(byte*) char_cursor#100 char_cursor zp ZP_WORD:8 18.363636363636363
|
||||
(byte*) char_cursor#102 char_cursor zp ZP_WORD:8 3.0
|
||||
(byte*) char_cursor#103 char_cursor zp ZP_WORD:8 15.999999999999998
|
||||
(byte*) char_cursor#104 char_cursor zp ZP_WORD:8 23.0
|
||||
(byte*) char_cursor#105 char_cursor zp ZP_WORD:8 17.333333333333332
|
||||
(byte*) char_cursor#109 char_cursor zp ZP_WORD:8 2.4444444444444446
|
||||
(byte*~) char_cursor#122 char_cursor zp ZP_WORD:8 22.0
|
||||
(byte*~) char_cursor#129 char_cursor zp ZP_WORD:8 22.0
|
||||
(byte*~) char_cursor#138 char_cursor zp ZP_WORD:8 22.0
|
||||
(byte*) char_cursor#14 char_cursor zp ZP_WORD:8 2.5227272727272725
|
||||
(byte*) char_cursor#64 char_cursor zp ZP_WORD:8 5.0
|
||||
(byte*) char_cursor#1 char_cursor zp ZP_WORD:10 101.0
|
||||
(byte*) char_cursor#126 char_cursor zp ZP_WORD:10 15.607142857142856
|
||||
(byte*) char_cursor#128 char_cursor zp ZP_WORD:10 3.0
|
||||
(byte*) char_cursor#129 char_cursor zp ZP_WORD:10 15.999999999999998
|
||||
(byte*) char_cursor#130 char_cursor zp ZP_WORD:10 3.0
|
||||
(byte*) char_cursor#131 char_cursor zp ZP_WORD:10 15.999999999999998
|
||||
(byte*) char_cursor#132 char_cursor zp ZP_WORD:10 24.0
|
||||
(byte*) char_cursor#133 char_cursor zp ZP_WORD:10 17.333333333333332
|
||||
(byte*) char_cursor#135 char_cursor zp ZP_WORD:10 2.4444444444444446
|
||||
(byte*~) char_cursor#155 char_cursor zp ZP_WORD:10 22.0
|
||||
(byte*~) char_cursor#162 char_cursor zp ZP_WORD:10 22.0
|
||||
(byte*) char_cursor#17 char_cursor zp ZP_WORD:10 2.0178571428571432
|
||||
(byte*~) char_cursor#179 char_cursor zp ZP_WORD:10 22.0
|
||||
(byte*~) char_cursor#185 char_cursor zp ZP_WORD:10 22.0
|
||||
(byte*) char_cursor#80 char_cursor zp ZP_WORD:10 6.0
|
||||
(signed word()) div16s((signed word) div16s::dividend , (signed word) div16s::divisor)
|
||||
(signed word~) div16s::$2 $2 zp ZP_WORD:10 2.0
|
||||
(signed word~) div16s::$7 $7 zp ZP_WORD:12 1.0
|
||||
(label) div16s::@15
|
||||
(label) div16s::@16
|
||||
(label) div16s::@17
|
||||
(label) div16s::@18
|
||||
(label) div16s::@2
|
||||
(label) div16s::@4
|
||||
(label) div16s::@5
|
||||
(label) div16s::@7
|
||||
(label) div16s::@9
|
||||
(label) div16s::@return
|
||||
(signed word) div16s::dividend
|
||||
(signed word) div16s::dividend#0 dividend zp ZP_WORD:7 5.0
|
||||
(word) div16s::dividendu
|
||||
(word) div16s::dividendu#3 dividendu zp ZP_WORD:10 0.8571428571428571
|
||||
(word~) div16s::dividendu#7 dividendu zp ZP_WORD:10 4.0
|
||||
(word~) div16s::dividendu#8 dividendu zp ZP_WORD:10 4.0
|
||||
(signed word) div16s::divisor
|
||||
(signed word) div16s::divisor#0 divisor zp ZP_WORD:12 2.142857142857143
|
||||
(word) div16s::divisoru
|
||||
(word) div16s::divisoru#3 divisoru zp ZP_WORD:12 3.0
|
||||
(word~) div16s::divisoru#4 divisoru zp ZP_WORD:12 4.0
|
||||
(word~) div16s::divisoru#5 divisoru zp ZP_WORD:12 4.0
|
||||
(byte) div16s::neg
|
||||
(byte) div16s::neg#2 reg byte y 2.0
|
||||
(byte) div16s::neg#3 reg byte y 1.0
|
||||
(byte) div16s::neg#4 reg byte y 1.0
|
||||
(word) div16s::resultu
|
||||
(word) div16s::resultu#0 resultu zp ZP_WORD:14 0.6666666666666666
|
||||
(signed word) div16s::return
|
||||
(signed word) div16s::return#0 return zp ZP_WORD:14 4.0
|
||||
(signed word) div16s::return#2 return zp ZP_WORD:14 5.0
|
||||
(signed word) div16s::return#3 return zp ZP_WORD:14 22.0
|
||||
(signed word~) div16s::return#6 return zp ZP_WORD:14 2.0
|
||||
(word()) div16u((word) div16u::dividend , (word) div16u::divisor)
|
||||
(byte~) div16u::$1 reg byte a 202.0
|
||||
(byte~) div16u::$2 reg byte a 202.0
|
||||
@ -24,30 +63,36 @@
|
||||
(label) div16u::@3
|
||||
(label) div16u::@4
|
||||
(label) div16u::@5
|
||||
(label) div16u::@6
|
||||
(label) div16u::@return
|
||||
(word) div16u::dividend
|
||||
(word) div16u::dividend#0 dividend zp ZP_WORD:8 25.25
|
||||
(word) div16u::dividend#1 dividend zp ZP_WORD:8 4.333333333333333
|
||||
(word) div16u::dividend#2 dividend zp ZP_WORD:8 43.57142857142858
|
||||
(word) div16u::dividend#0 dividend zp ZP_WORD:10 25.25
|
||||
(word) div16u::dividend#1 dividend zp ZP_WORD:10 2.0
|
||||
(word) div16u::dividend#2 dividend zp ZP_WORD:10 11.0
|
||||
(word) div16u::dividend#3 dividend zp ZP_WORD:10 43.57142857142858
|
||||
(word) div16u::dividend#5 dividend zp ZP_WORD:10 15.0
|
||||
(word) div16u::divisor
|
||||
(word) div16u::divisor#0 divisor zp ZP_WORD:18 12.529411764705884
|
||||
(word) div16u::divisor#0 divisor zp ZP_WORD:12 4.0
|
||||
(word) div16u::divisor#1 divisor zp ZP_WORD:12 22.0
|
||||
(word) div16u::divisor#6 divisor zp ZP_WORD:12 13.4375
|
||||
(byte) div16u::i
|
||||
(byte) div16u::i#1 reg byte x 151.5
|
||||
(byte) div16u::i#2 reg byte x 15.538461538461538
|
||||
(word) div16u::quotient
|
||||
(word) div16u::quotient#1 quotient zp ZP_WORD:12 151.5
|
||||
(word) div16u::quotient#2 quotient zp ZP_WORD:12 101.0
|
||||
(word) div16u::quotient#3 quotient zp ZP_WORD:12 25.25
|
||||
(word) div16u::quotient#1 quotient zp ZP_WORD:14 151.5
|
||||
(word) div16u::quotient#2 quotient zp ZP_WORD:14 101.0
|
||||
(word) div16u::quotient#3 quotient zp ZP_WORD:14 25.25
|
||||
(word) div16u::rem
|
||||
(word) div16u::rem#1 rem zp ZP_WORD:10 75.75
|
||||
(word) div16u::rem#2 rem zp ZP_WORD:10 202.0
|
||||
(word) div16u::rem#3 rem zp ZP_WORD:10 202.0
|
||||
(word) div16u::rem#4 rem zp ZP_WORD:10 202.0
|
||||
(word) div16u::rem#5 rem zp ZP_WORD:10 101.0
|
||||
(word) div16u::rem#8 rem zp ZP_WORD:10 12.5
|
||||
(word) div16u::rem#1 rem zp ZP_WORD:3 75.75
|
||||
(word) div16u::rem#2 rem zp ZP_WORD:3 202.0
|
||||
(word) div16u::rem#3 rem zp ZP_WORD:3 202.0
|
||||
(word) div16u::rem#4 rem zp ZP_WORD:3 202.0
|
||||
(word) div16u::rem#5 rem zp ZP_WORD:3 101.0
|
||||
(word) div16u::rem#8 rem zp ZP_WORD:3 101.66666666666667
|
||||
(word) div16u::return
|
||||
(word) div16u::return#0 return zp ZP_WORD:12 62.8
|
||||
(word) div16u::return#2 return zp ZP_WORD:12 22.0
|
||||
(word) div16u::return#0 return zp ZP_WORD:14 45.142857142857146
|
||||
(word) div16u::return#2 return zp ZP_WORD:14 4.0
|
||||
(word) div16u::return#3 return zp ZP_WORD:14 22.0
|
||||
(signed byte()) div8s((signed byte) div8s::dividend , (signed byte) div8s::divisor)
|
||||
(signed byte~) div8s::$2 reg byte a 2.0
|
||||
(signed byte~) div8s::$7 reg byte x 1.0
|
||||
@ -63,22 +108,22 @@
|
||||
(label) div8s::@return
|
||||
(signed byte) div8s::dividend
|
||||
(signed byte) div8s::dividend#0 reg byte a 5.0
|
||||
(byte) div8s::dividendb
|
||||
(byte) div8s::dividendb#3 reg byte y 0.8571428571428571
|
||||
(byte~) div8s::dividendb#7 reg byte y 4.0
|
||||
(byte~) div8s::dividendb#8 reg byte y 4.0
|
||||
(byte) div8s::dividendu
|
||||
(byte) div8s::dividendu#3 reg byte y 0.8571428571428571
|
||||
(byte~) div8s::dividendu#7 reg byte y 4.0
|
||||
(byte~) div8s::dividendu#8 reg byte y 4.0
|
||||
(signed byte) div8s::divisor
|
||||
(signed byte) div8s::divisor#0 reg byte x 2.142857142857143
|
||||
(byte) div8s::divisorb
|
||||
(byte) div8s::divisorb#3 reg byte x 3.0
|
||||
(byte~) div8s::divisorb#4 reg byte x 4.0
|
||||
(byte~) div8s::divisorb#5 reg byte x 4.0
|
||||
(byte) div8s::divisoru
|
||||
(byte) div8s::divisoru#3 reg byte x 3.0
|
||||
(byte~) div8s::divisoru#4 reg byte x 4.0
|
||||
(byte~) div8s::divisoru#5 reg byte x 4.0
|
||||
(byte) div8s::neg
|
||||
(byte) div8s::neg#2 neg zp ZP_BYTE:17 2.0
|
||||
(byte) div8s::neg#3 neg zp ZP_BYTE:17 1.0
|
||||
(byte) div8s::neg#4 neg zp ZP_BYTE:17 1.0
|
||||
(byte) div8s::resultb
|
||||
(byte) div8s::resultb#0 reg byte y 0.6666666666666666
|
||||
(byte) div8s::neg#2 neg zp ZP_BYTE:16 2.0
|
||||
(byte) div8s::neg#3 neg zp ZP_BYTE:16 1.0
|
||||
(byte) div8s::neg#4 neg zp ZP_BYTE:16 1.0
|
||||
(byte) div8s::resultu
|
||||
(byte) div8s::resultu#0 reg byte y 0.6666666666666666
|
||||
(signed byte) div8s::return
|
||||
(signed byte) div8s::return#0 reg byte a 4.0
|
||||
(signed byte) div8s::return#2 reg byte a 5.0
|
||||
@ -94,22 +139,22 @@
|
||||
(label) div8u::@6
|
||||
(label) div8u::@return
|
||||
(byte) div8u::dividend
|
||||
(byte) div8u::dividend#0 dividend zp ZP_BYTE:15 25.25
|
||||
(byte) div8u::dividend#1 dividend zp ZP_BYTE:15 2.0
|
||||
(byte) div8u::dividend#2 dividend zp ZP_BYTE:15 11.0
|
||||
(byte) div8u::dividend#3 dividend zp ZP_BYTE:15 50.83333333333333
|
||||
(byte) div8u::dividend#5 dividend zp ZP_BYTE:15 15.0
|
||||
(byte) div8u::dividend#0 dividend zp ZP_BYTE:18 25.25
|
||||
(byte) div8u::dividend#1 dividend zp ZP_BYTE:18 2.0
|
||||
(byte) div8u::dividend#2 dividend zp ZP_BYTE:18 11.0
|
||||
(byte) div8u::dividend#3 dividend zp ZP_BYTE:18 50.83333333333333
|
||||
(byte) div8u::dividend#5 dividend zp ZP_BYTE:18 15.0
|
||||
(byte) div8u::divisor
|
||||
(byte) div8u::divisor#0 divisor zp ZP_BYTE:14 4.0
|
||||
(byte) div8u::divisor#1 divisor zp ZP_BYTE:14 22.0
|
||||
(byte) div8u::divisor#6 divisor zp ZP_BYTE:14 14.333333333333332
|
||||
(byte) div8u::divisor#0 divisor zp ZP_BYTE:17 4.0
|
||||
(byte) div8u::divisor#1 divisor zp ZP_BYTE:17 22.0
|
||||
(byte) div8u::divisor#6 divisor zp ZP_BYTE:17 14.333333333333332
|
||||
(byte) div8u::i
|
||||
(byte) div8u::i#1 reg byte x 151.5
|
||||
(byte) div8u::i#2 reg byte x 16.833333333333332
|
||||
(byte) div8u::quotient
|
||||
(byte) div8u::quotient#1 quotient zp ZP_BYTE:16 151.5
|
||||
(byte) div8u::quotient#2 quotient zp ZP_BYTE:16 101.0
|
||||
(byte) div8u::quotient#3 quotient zp ZP_BYTE:16 28.857142857142858
|
||||
(byte) div8u::quotient#1 quotient zp ZP_BYTE:19 151.5
|
||||
(byte) div8u::quotient#2 quotient zp ZP_BYTE:19 101.0
|
||||
(byte) div8u::quotient#3 quotient zp ZP_BYTE:19 28.857142857142858
|
||||
(byte) div8u::rem
|
||||
(byte) div8u::rem#1 reg byte y 101.0
|
||||
(byte) div8u::rem#2 reg byte y 202.0
|
||||
@ -118,18 +163,19 @@
|
||||
(byte) div8u::rem#5 reg byte y 101.0
|
||||
(byte) div8u::rem#8 reg byte y 101.66666666666667
|
||||
(byte) div8u::return
|
||||
(byte) div8u::return#0 return zp ZP_BYTE:16 45.142857142857146
|
||||
(byte) div8u::return#0 return zp ZP_BYTE:19 45.142857142857146
|
||||
(byte) div8u::return#2 reg byte a 4.0
|
||||
(byte) div8u::return#3 reg byte a 22.0
|
||||
(byte*) line_cursor
|
||||
(byte*) line_cursor#1 line_cursor zp ZP_WORD:3 5.3478260869565215
|
||||
(byte*) line_cursor#17 line_cursor zp ZP_WORD:3 204.0
|
||||
(byte*) line_cursor#33 line_cursor zp ZP_WORD:3 35.0
|
||||
(byte*) line_cursor#37 line_cursor zp ZP_WORD:3 0.9565217391304348
|
||||
(byte*) line_cursor#1 line_cursor zp ZP_WORD:5 3.9099999999999993
|
||||
(byte*) line_cursor#20 line_cursor zp ZP_WORD:5 204.0
|
||||
(byte*) line_cursor#39 line_cursor zp ZP_WORD:5 46.0
|
||||
(byte*) line_cursor#41 line_cursor zp ZP_WORD:5 0.9565217391304348
|
||||
(void()) main()
|
||||
(label) main::@1
|
||||
(label) main::@2
|
||||
(label) main::@3
|
||||
(label) main::@4
|
||||
(label) main::@return
|
||||
(void()) print_byte((byte) print_byte::b)
|
||||
(byte~) print_byte::$0 reg byte a 4.0
|
||||
@ -137,22 +183,22 @@
|
||||
(label) print_byte::@1
|
||||
(label) print_byte::@return
|
||||
(byte) print_byte::b
|
||||
(byte) print_byte::b#1 b zp ZP_BYTE:7 4.0
|
||||
(byte) print_byte::b#2 b zp ZP_BYTE:7 4.0
|
||||
(byte) print_byte::b#3 b zp ZP_BYTE:7 11.0
|
||||
(byte) print_byte::b#4 b zp ZP_BYTE:7 22.0
|
||||
(byte) print_byte::b#5 b zp ZP_BYTE:7 22.0
|
||||
(byte) print_byte::b#6 b zp ZP_BYTE:7 22.0
|
||||
(byte) print_byte::b#7 b zp ZP_BYTE:7 13.5
|
||||
(byte~) print_byte::b#9 b zp ZP_BYTE:7 4.0
|
||||
(byte) print_byte::b#1 b zp ZP_BYTE:9 4.0
|
||||
(byte) print_byte::b#2 b zp ZP_BYTE:9 4.0
|
||||
(byte) print_byte::b#3 b zp ZP_BYTE:9 22.0
|
||||
(byte) print_byte::b#4 b zp ZP_BYTE:9 22.0
|
||||
(byte) print_byte::b#5 b zp ZP_BYTE:9 22.0
|
||||
(byte) print_byte::b#6 b zp ZP_BYTE:9 22.0
|
||||
(byte) print_byte::b#7 b zp ZP_BYTE:9 13.5
|
||||
(byte~) print_byte::b#9 b zp ZP_BYTE:9 4.0
|
||||
(byte[]) print_byte::hextab
|
||||
(const string) print_byte::hextab#0 hextab = (string) "0123456789abcdef"
|
||||
(void()) print_char((byte) print_char::ch)
|
||||
(label) print_char::@return
|
||||
(byte) print_char::ch
|
||||
(byte) print_char::ch#1 reg byte a 4.0
|
||||
(byte) print_char::ch#2 reg byte a 4.0
|
||||
(byte) print_char::ch#3 reg byte a 6.0
|
||||
(byte) print_char::ch#3 reg byte a 4.0
|
||||
(byte) print_char::ch#4 reg byte a 6.0
|
||||
(void()) print_cls()
|
||||
(label) print_cls::@1
|
||||
(label) print_cls::@return
|
||||
@ -168,40 +214,88 @@
|
||||
(label) print_sbyte::@4
|
||||
(label) print_sbyte::@return
|
||||
(signed byte) print_sbyte::b
|
||||
(signed byte) print_sbyte::b#0 b zp ZP_BYTE:7 4.0
|
||||
(signed byte) print_sbyte::b#1 b zp ZP_BYTE:7 22.0
|
||||
(signed byte) print_sbyte::b#2 b zp ZP_BYTE:7 22.0
|
||||
(signed byte) print_sbyte::b#3 b zp ZP_BYTE:7 22.0
|
||||
(signed byte) print_sbyte::b#4 b zp ZP_BYTE:7 22.0
|
||||
(signed byte) print_sbyte::b#5 b zp ZP_BYTE:7 12.5
|
||||
(signed byte) print_sbyte::b#6 b zp ZP_BYTE:7 4.0
|
||||
(signed byte) print_sbyte::b#0 b zp ZP_BYTE:9 4.0
|
||||
(signed byte) print_sbyte::b#1 b zp ZP_BYTE:9 11.0
|
||||
(signed byte) print_sbyte::b#2 b zp ZP_BYTE:9 22.0
|
||||
(signed byte) print_sbyte::b#3 b zp ZP_BYTE:9 22.0
|
||||
(signed byte) print_sbyte::b#4 b zp ZP_BYTE:9 22.0
|
||||
(signed byte) print_sbyte::b#5 b zp ZP_BYTE:9 12.5
|
||||
(signed byte) print_sbyte::b#6 b zp ZP_BYTE:9 4.0
|
||||
(void()) print_str((byte*) print_str::str)
|
||||
(label) print_str::@1
|
||||
(label) print_str::@2
|
||||
(label) print_str::@return
|
||||
(byte*) print_str::str
|
||||
(byte*) print_str::str#0 str zp ZP_WORD:5 202.0
|
||||
(byte*) print_str::str#10 str zp ZP_WORD:5 101.5
|
||||
(byte*) print_str::str#12 str zp ZP_WORD:5 2.0
|
||||
(byte*) print_str::str#0 str zp ZP_WORD:7 202.0
|
||||
(byte*) print_str::str#13 str zp ZP_WORD:7 101.5
|
||||
(byte*) print_str::str#15 str zp ZP_WORD:7 2.0
|
||||
(void()) print_sword((signed word) print_sword::w)
|
||||
(label) print_sword::@1
|
||||
(label) print_sword::@2
|
||||
(label) print_sword::@4
|
||||
(label) print_sword::@return
|
||||
(signed word) print_sword::w
|
||||
(signed word) print_sword::w#0 w zp ZP_WORD:7 4.0
|
||||
(signed word) print_sword::w#1 w zp ZP_WORD:7 11.0
|
||||
(signed word) print_sword::w#2 w zp ZP_WORD:7 22.0
|
||||
(signed word) print_sword::w#3 w zp ZP_WORD:7 22.0
|
||||
(signed word) print_sword::w#4 w zp ZP_WORD:7 22.0
|
||||
(signed word) print_sword::w#5 w zp ZP_WORD:7 12.5
|
||||
(signed word) print_sword::w#6 w zp ZP_WORD:7 4.0
|
||||
(void()) print_word((word) print_word::w)
|
||||
(label) print_word::@1
|
||||
(label) print_word::@return
|
||||
(word) print_word::w
|
||||
(word) print_word::w#0 w zp ZP_WORD:5 11.0
|
||||
(word) print_word::w#1 w zp ZP_WORD:5 22.0
|
||||
(word) print_word::w#2 w zp ZP_WORD:5 22.0
|
||||
(word) print_word::w#3 w zp ZP_WORD:5 22.0
|
||||
(word) print_word::w#4 w zp ZP_WORD:5 15.999999999999998
|
||||
(word) print_word::w#1 w zp ZP_WORD:7 11.0
|
||||
(word) print_word::w#2 w zp ZP_WORD:7 22.0
|
||||
(word) print_word::w#3 w zp ZP_WORD:7 22.0
|
||||
(word) print_word::w#4 w zp ZP_WORD:7 22.0
|
||||
(word) print_word::w#5 w zp ZP_WORD:7 16.666666666666664
|
||||
(word~) print_word::w#7 w zp ZP_WORD:7 4.0
|
||||
(signed word) rem16s
|
||||
(signed word) rem16s#1 rem16s zp ZP_WORD:3 2.0
|
||||
(signed word) rem16s#17 rem16s zp ZP_WORD:3 110.0
|
||||
(signed word) rem16s#3 rem16s zp ZP_WORD:3 1.0833333333333333
|
||||
(signed word~) rem16s#32 rem16s zp ZP_WORD:3 4.0
|
||||
(word) rem16u
|
||||
(word) rem16u#16 rem16u zp ZP_WORD:10 110.0
|
||||
(word) rem16u#1 rem16u zp ZP_WORD:3 0.8275862068965517
|
||||
(word) rem16u#30 rem16u zp ZP_WORD:3 110.0
|
||||
(signed byte) rem8s
|
||||
(signed byte) rem8s#1 rem8s zp ZP_BYTE:14 2.0
|
||||
(signed byte) rem8s#18 rem8s zp ZP_BYTE:14 110.0
|
||||
(signed byte) rem8s#3 rem8s zp ZP_BYTE:14 1.0833333333333333
|
||||
(signed byte~) rem8s#32 rem8s zp ZP_BYTE:14 4.0
|
||||
(signed byte) rem8s#1 reg byte x 2.0
|
||||
(signed byte) rem8s#18 reg byte x 110.0
|
||||
(signed byte) rem8s#3 reg byte x 1.0833333333333333
|
||||
(signed byte~) rem8s#33 reg byte x 4.0
|
||||
(byte) rem8u
|
||||
(byte) rem8u#1 reg byte x 0.48
|
||||
(byte) rem8u#33 reg byte x 110.0
|
||||
(byte) rem8u#1 reg byte x 0.8275862068965517
|
||||
(byte) rem8u#31 reg byte x 110.0
|
||||
(void()) test_16s()
|
||||
(label) test_16s::@1
|
||||
(label) test_16s::@10
|
||||
(label) test_16s::@11
|
||||
(label) test_16s::@3
|
||||
(label) test_16s::@4
|
||||
(label) test_16s::@5
|
||||
(label) test_16s::@6
|
||||
(label) test_16s::@7
|
||||
(label) test_16s::@8
|
||||
(label) test_16s::@9
|
||||
(label) test_16s::@return
|
||||
(signed word) test_16s::dividend
|
||||
(signed word) test_16s::dividend#0 dividend zp ZP_WORD:7 4.714285714285714
|
||||
(signed word[]) test_16s::dividends
|
||||
(const signed word[]) test_16s::dividends#0 dividends = { (word/signed word/dword/signed dword) 32767, (word/signed word/dword/signed dword) 32767, -(word/signed word/dword/signed dword) 32767, -(word/signed word/dword/signed dword) 32767, (word/signed word/dword/signed dword) 32767, -(word/signed word/dword/signed dword) 32767 }
|
||||
(signed word) test_16s::divisor
|
||||
(signed word) test_16s::divisor#0 divisor zp ZP_WORD:20 3.0
|
||||
(signed word[]) test_16s::divisors
|
||||
(const signed word[]) test_16s::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, -(byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, -(byte/signed byte/word/signed word/dword/signed dword) 13, -(byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
|
||||
(byte) test_16s::i
|
||||
(byte) test_16s::i#1 i zp ZP_BYTE:2 16.5
|
||||
(byte) test_16s::i#10 i zp ZP_BYTE:2 1.76
|
||||
(signed word) test_16s::res
|
||||
(signed word) test_16s::res#0 res zp ZP_WORD:14 2.2
|
||||
(const string) test_16s::str str = (string) " / @"
|
||||
(const string) test_16s::str1 str1 = (string) " = @"
|
||||
(const string) test_16s::str2 str2 = (string) " @"
|
||||
(void()) test_16u()
|
||||
(label) test_16u::@1
|
||||
(label) test_16u::@10
|
||||
@ -215,18 +309,18 @@
|
||||
(label) test_16u::@9
|
||||
(label) test_16u::@return
|
||||
(word) test_16u::dividend
|
||||
(word) test_16u::dividend#0 dividend zp ZP_WORD:5 4.714285714285714
|
||||
(word) test_16u::dividend#0 dividend zp ZP_WORD:7 4.714285714285714
|
||||
(word[]) test_16u::dividends
|
||||
(const word[]) test_16u::dividends#0 dividends = { (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535, (word/dword/signed dword) 65535 }
|
||||
(word) test_16u::divisor
|
||||
(word) test_16u::divisor#0 divisor zp ZP_WORD:18 3.0
|
||||
(word) test_16u::divisor#0 divisor zp ZP_WORD:12 3.0
|
||||
(word[]) test_16u::divisors
|
||||
(const word[]) test_16u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
|
||||
(byte) test_16u::i
|
||||
(byte) test_16u::i#1 i zp ZP_BYTE:2 16.5
|
||||
(byte) test_16u::i#10 i zp ZP_BYTE:2 1.76
|
||||
(word) test_16u::res
|
||||
(word) test_16u::res#0 res zp ZP_WORD:12 2.2
|
||||
(word) test_16u::res#0 res zp ZP_WORD:14 2.2
|
||||
(const string) test_16u::str str = (string) " / @"
|
||||
(const string) test_16u::str1 str1 = (string) " = @"
|
||||
(const string) test_16u::str2 str2 = (string) " @"
|
||||
@ -234,7 +328,6 @@
|
||||
(label) test_8s::@1
|
||||
(label) test_8s::@10
|
||||
(label) test_8s::@11
|
||||
(label) test_8s::@12
|
||||
(label) test_8s::@3
|
||||
(label) test_8s::@4
|
||||
(label) test_8s::@5
|
||||
@ -244,18 +337,18 @@
|
||||
(label) test_8s::@9
|
||||
(label) test_8s::@return
|
||||
(signed byte) test_8s::dividend
|
||||
(signed byte) test_8s::dividend#0 dividend zp ZP_BYTE:7 4.714285714285714
|
||||
(signed byte) test_8s::dividend#0 dividend zp ZP_BYTE:9 4.714285714285714
|
||||
(signed byte[]) test_8s::dividends
|
||||
(const signed byte[]) test_8s::dividends#0 dividends = { (byte/signed byte/word/signed word/dword/signed dword) 127, -(byte/signed byte/word/signed word/dword/signed dword) 127, -(byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127, (byte/signed byte/word/signed word/dword/signed dword) 127 }
|
||||
(signed byte) test_8s::divisor
|
||||
(signed byte) test_8s::divisor#0 divisor zp ZP_BYTE:20 3.3000000000000003
|
||||
(signed byte) test_8s::divisor#0 divisor zp ZP_BYTE:22 3.0
|
||||
(signed byte[]) test_8s::divisors
|
||||
(const signed byte[]) test_8s::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, -(byte/signed byte/word/signed word/dword/signed dword) 11, -(byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
|
||||
(byte) test_8s::i
|
||||
(byte) test_8s::i#1 i zp ZP_BYTE:2 11.0
|
||||
(byte) test_8s::i#10 i zp ZP_BYTE:2 1.8333333333333333
|
||||
(byte) test_8s::i#1 i zp ZP_BYTE:2 16.5
|
||||
(byte) test_8s::i#10 i zp ZP_BYTE:2 1.76
|
||||
(signed byte) test_8s::res
|
||||
(signed byte) test_8s::res#0 res zp ZP_BYTE:15 2.4444444444444446
|
||||
(signed byte) test_8s::res#0 res zp ZP_BYTE:16 2.2
|
||||
(const string) test_8s::str str = (string) " / @"
|
||||
(const string) test_8s::str1 str1 = (string) " = @"
|
||||
(const string) test_8s::str2 str2 = (string) " @"
|
||||
@ -263,6 +356,7 @@
|
||||
(label) test_8u::@1
|
||||
(label) test_8u::@10
|
||||
(label) test_8u::@11
|
||||
(label) test_8u::@12
|
||||
(label) test_8u::@3
|
||||
(label) test_8u::@4
|
||||
(label) test_8u::@5
|
||||
@ -272,53 +366,56 @@
|
||||
(label) test_8u::@9
|
||||
(label) test_8u::@return
|
||||
(byte) test_8u::dividend
|
||||
(byte) test_8u::dividend#0 dividend zp ZP_BYTE:7 4.714285714285714
|
||||
(byte) test_8u::dividend#0 dividend zp ZP_BYTE:9 4.714285714285714
|
||||
(byte[]) test_8u::dividends
|
||||
(const byte[]) test_8u::dividends#0 dividends = { (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255, (byte/word/signed word/dword/signed dword) 255 }
|
||||
(byte) test_8u::divisor
|
||||
(byte) test_8u::divisor#0 divisor zp ZP_BYTE:14 3.0
|
||||
(byte) test_8u::divisor#0 divisor zp ZP_BYTE:17 3.3000000000000003
|
||||
(byte[]) test_8u::divisors
|
||||
(const byte[]) test_8u::divisors#0 divisors = { (byte/signed byte/word/signed word/dword/signed dword) 5, (byte/signed byte/word/signed word/dword/signed dword) 7, (byte/signed byte/word/signed word/dword/signed dword) 11, (byte/signed byte/word/signed word/dword/signed dword) 13, (byte/signed byte/word/signed word/dword/signed dword) 17, (byte/signed byte/word/signed word/dword/signed dword) 19 }
|
||||
(byte) test_8u::i
|
||||
(byte) test_8u::i#1 i zp ZP_BYTE:2 16.5
|
||||
(byte) test_8u::i#10 i zp ZP_BYTE:2 1.76
|
||||
(byte) test_8u::i#1 i zp ZP_BYTE:2 11.0
|
||||
(byte) test_8u::i#10 i zp ZP_BYTE:2 1.8333333333333333
|
||||
(byte) test_8u::res
|
||||
(byte) test_8u::res#0 res zp ZP_BYTE:15 2.2
|
||||
(byte) test_8u::res#0 res zp ZP_BYTE:16 2.4444444444444446
|
||||
(const string) test_8u::str str = (string) " / @"
|
||||
(const string) test_8u::str1 str1 = (string) " = @"
|
||||
(const string) test_8u::str2 str2 = (string) " @"
|
||||
|
||||
zp ZP_BYTE:2 [ test_16u::i#10 test_16u::i#1 test_8u::i#10 test_8u::i#1 test_8s::i#10 test_8s::i#1 ]
|
||||
zp ZP_WORD:3 [ line_cursor#17 line_cursor#33 line_cursor#1 line_cursor#37 print_cls::sc#2 print_cls::sc#1 ]
|
||||
zp ZP_WORD:5 [ print_word::w#4 print_word::w#0 print_word::w#1 print_word::w#2 print_word::w#3 test_16u::dividend#0 print_str::str#10 print_str::str#12 print_str::str#0 ]
|
||||
zp ZP_BYTE:7 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 test_8u::dividend#0 test_8s::dividend#0 ]
|
||||
reg byte a [ print_char::ch#3 print_char::ch#1 print_char::ch#2 ]
|
||||
zp ZP_WORD:8 [ char_cursor#64 char_cursor#105 char_cursor#102 char_cursor#104 char_cursor#122 char_cursor#100 char_cursor#14 char_cursor#129 char_cursor#103 char_cursor#1 char_cursor#109 char_cursor#138 div16u::dividend#2 div16u::dividend#1 div16u::dividend#0 ]
|
||||
zp ZP_WORD:10 [ div16u::rem#4 rem16u#16 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 ]
|
||||
zp ZP_WORD:12 [ div16u::quotient#3 div16u::return#0 div16u::quotient#1 div16u::quotient#2 div16u::return#2 test_16u::res#0 ]
|
||||
zp ZP_BYTE:2 [ test_16s::i#10 test_16s::i#1 test_8s::i#10 test_8s::i#1 test_16u::i#10 test_16u::i#1 test_8u::i#10 test_8u::i#1 ]
|
||||
zp ZP_WORD:3 [ rem16s#17 rem16s#3 rem16s#32 rem16s#1 rem16u#30 rem16u#1 div16u::rem#4 div16u::rem#8 div16u::rem#5 div16u::rem#1 div16u::rem#2 div16u::rem#3 print_cls::sc#2 print_cls::sc#1 ]
|
||||
zp ZP_WORD:5 [ line_cursor#20 line_cursor#39 line_cursor#1 line_cursor#41 ]
|
||||
zp ZP_WORD:7 [ print_sword::w#6 print_sword::w#5 print_sword::w#1 print_sword::w#2 print_sword::w#3 print_sword::w#4 print_sword::w#0 print_word::w#5 print_word::w#7 print_word::w#1 print_word::w#2 print_word::w#3 print_word::w#4 test_16s::dividend#0 div16s::dividend#0 test_16u::dividend#0 print_str::str#13 print_str::str#15 print_str::str#0 ]
|
||||
zp ZP_BYTE:9 [ print_byte::b#7 print_byte::b#9 print_byte::b#1 print_byte::b#2 print_byte::b#3 print_byte::b#4 print_byte::b#5 print_byte::b#6 print_sbyte::b#6 print_sbyte::b#5 print_sbyte::b#1 print_sbyte::b#2 print_sbyte::b#3 print_sbyte::b#4 print_sbyte::b#0 test_8s::dividend#0 test_8u::dividend#0 ]
|
||||
reg byte a [ print_char::ch#4 print_char::ch#2 print_char::ch#3 ]
|
||||
zp ZP_WORD:10 [ char_cursor#80 char_cursor#133 char_cursor#130 char_cursor#132 char_cursor#128 char_cursor#129 char_cursor#155 char_cursor#126 char_cursor#17 char_cursor#162 char_cursor#135 char_cursor#131 char_cursor#1 char_cursor#179 char_cursor#185 div16s::dividendu#3 div16s::dividendu#7 div16s::dividendu#8 div16u::dividend#3 div16u::dividend#5 div16u::dividend#1 div16u::dividend#2 div16u::dividend#0 div16s::$2 ]
|
||||
zp ZP_WORD:12 [ div16s::divisoru#3 div16s::divisoru#4 div16s::divisoru#5 div16u::divisor#6 div16u::divisor#0 div16u::divisor#1 div16s::divisor#0 div16s::$7 test_16u::divisor#0 ]
|
||||
reg byte y [ div16s::neg#4 div16s::neg#3 div16s::neg#2 ]
|
||||
zp ZP_WORD:14 [ div16s::return#2 div16s::return#6 div16s::return#0 div16s::resultu#0 div16s::return#3 test_16s::res#0 div16u::return#2 div16u::quotient#3 div16u::return#0 div16u::quotient#1 div16u::quotient#2 div16u::return#3 test_16u::res#0 ]
|
||||
reg byte x [ div16u::i#2 div16u::i#1 ]
|
||||
zp ZP_BYTE:14 [ div8u::divisor#6 div8u::divisor#0 div8u::divisor#1 test_8u::divisor#0 rem8s#18 rem8s#3 rem8s#32 rem8s#1 ]
|
||||
reg byte y [ div8u::rem#4 div8u::rem#8 div8u::rem#5 div8u::rem#1 div8u::rem#2 div8u::rem#3 ]
|
||||
zp ZP_BYTE:15 [ div8u::dividend#3 div8u::dividend#5 div8u::dividend#1 div8u::dividend#2 div8u::dividend#0 test_8u::res#0 test_8s::res#0 ]
|
||||
zp ZP_BYTE:16 [ div8u::quotient#3 div8u::return#0 div8u::quotient#1 div8u::quotient#2 ]
|
||||
reg byte x [ div8u::i#2 div8u::i#1 ]
|
||||
reg byte x [ rem8u#33 rem8u#1 ]
|
||||
reg byte y [ div8s::dividendb#3 div8s::dividendb#7 div8s::dividendb#8 ]
|
||||
reg byte x [ div8s::divisorb#3 div8s::divisorb#4 div8s::divisorb#5 ]
|
||||
zp ZP_BYTE:17 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 ]
|
||||
reg byte x [ rem8s#18 rem8s#3 rem8s#33 rem8s#1 ]
|
||||
reg byte y [ div8s::dividendu#3 div8s::dividendu#7 div8s::dividendu#8 ]
|
||||
reg byte x [ div8s::divisoru#3 div8s::divisoru#4 div8s::divisoru#5 ]
|
||||
zp ZP_BYTE:16 [ div8s::neg#4 div8s::neg#3 div8s::neg#2 test_8s::res#0 test_8u::res#0 ]
|
||||
reg byte a [ div8s::return#2 div8s::return#6 div8s::return#0 ]
|
||||
zp ZP_WORD:18 [ test_16u::divisor#0 div16u::divisor#0 ]
|
||||
zp ZP_BYTE:17 [ div8u::divisor#6 div8u::divisor#0 div8u::divisor#1 test_8u::divisor#0 ]
|
||||
reg byte y [ div8u::rem#4 div8u::rem#8 div8u::rem#5 div8u::rem#1 div8u::rem#2 div8u::rem#3 ]
|
||||
zp ZP_BYTE:18 [ div8u::dividend#3 div8u::dividend#5 div8u::dividend#1 div8u::dividend#2 div8u::dividend#0 ]
|
||||
zp ZP_BYTE:19 [ div8u::quotient#3 div8u::return#0 div8u::quotient#1 div8u::quotient#2 ]
|
||||
reg byte x [ div8u::i#2 div8u::i#1 ]
|
||||
reg byte x [ rem8u#31 rem8u#1 ]
|
||||
zp ZP_WORD:20 [ test_16s::divisor#0 ]
|
||||
reg byte a [ print_byte::$0 ]
|
||||
reg byte a [ print_byte::$2 ]
|
||||
reg byte a [ div16u::$1 ]
|
||||
reg byte a [ div16u::$2 ]
|
||||
reg byte a [ div8u::return#3 ]
|
||||
reg byte a [ div8u::$1 ]
|
||||
zp ZP_BYTE:20 [ test_8s::divisor#0 ]
|
||||
zp ZP_BYTE:22 [ test_8s::divisor#0 ]
|
||||
reg byte a [ div8s::dividend#0 ]
|
||||
reg byte x [ div8s::divisor#0 ]
|
||||
reg byte a [ div8s::return#3 ]
|
||||
reg byte a [ div8s::$2 ]
|
||||
reg byte x [ div8s::$7 ]
|
||||
reg byte a [ div8u::return#2 ]
|
||||
reg byte y [ div8s::resultb#0 ]
|
||||
reg byte y [ div8s::resultu#0 ]
|
||||
reg byte a [ div8u::$1 ]
|
||||
reg byte a [ div8u::return#3 ]
|
||||
|
Loading…
Reference in New Issue
Block a user