Prechádzať zdrojové kódy

what the fuck is going on? - did some debug output

Phil 5 rokov pred
rodič
commit
948126014f
1 zmenil súbory, kde vykonal 24 pridanie a 12 odobranie
  1. 24 12
      dino.asm

+ 24 - 12
dino.asm

@@ -30,7 +30,7 @@ _start:
 	mov ecx, [sz+0]		;rows in ecx
 
 hundreds:
-	cmp ecx, 100		;check if above 100
+	cmp ecx, 0x64		;check if above 100
 	jge inchundred		;jump to increment hundreds if needed
 	
 	mov eax,[ha]		;hundred count to eax
@@ -38,7 +38,7 @@ hundreds:
 	mov [num+0], eax	;move to first byte of num string
 
 tens:
-	cmp ecx, 10		;check if above 10
+	cmp ecx, 0xa		;check if above 10
 	jge inctens		;jump to increment tens if needed
 	
 	mov eax,[ta]
@@ -50,19 +50,31 @@ tens:
 	mov [num+2], eax	
 	mov [num+3], byte 0xa 	;linebreak
 
+	;mov eax, SYS_WRITE
+	;mov ebx, STDOUT
+	;mov ecx, num
+	;mov edx, 4
+	;int 0x80
+
+
+	;print hundreds
+	;mov eax, [ha]
+	;add eax, '0'
+	;mov[ha], eax
+	
 	mov eax, SYS_WRITE
 	mov ebx, STDOUT
-	mov ecx, num
-	mov edx, 4
-	int 0x80
+	mov ecx, ha
+	mov edx, 1
+	int 0x80	
 
 	; print cols
 
-	mov eax, SYS_WRITE
-	mov ebx, STDOUT
-	mov ecx, sz+2
-	mov edx, 3
-	int 0x80
+	;mov eax, SYS_WRITE
+	;mov ebx, STDOUT
+	;mov ecx, sz+2
+	;mov edx, 3
+	;int 0x80
 
 exit:
 	;exit
@@ -72,10 +84,10 @@ exit:
 
 inchundred:
 	inc byte [ha]		;increment hundreds
-	sub ecx, 100
+	sub ecx, 0x64
 	jmp hundreds
 
 inctens:
 	inc byte [ta]		;increment tens
-	sub ecx, 10
+	sub ecx, 0xa
 	jmp tens