flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
DOS386 10 Dec 2006, 18:02
Quote:
As far as I can analyze the bug, you fail to convert the binary number to a string. You name it "string", but do NOT convert it. BASIC converts numbers for you, ASM/CPU doesn't. One probably could do it with divisions like: 65'025\10 = 6'502, remainder 5 etc., maybe there are other ways to do. Decimal output is NOT trivial in ASM. Hint: try HEX output first. _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
rugxulo 10 Dec 2006, 21:19
|
|||
![]() |
|
zir_blazer 11 Dec 2006, 00:14
These routines probabily does what I'm needing, however, how I am supposed to add it effectively to my code and get the desired result? My knowledge in Assembler is minimal and I got no idea on how to interprete what the code does and how to use it.
By the way, what I want to see is the Register content, I don't care if it is in Binary, Decimal or Hexadecimal, just that it is in a human readable format (When I mean garbage, I'm talking about random symbols). |
|||
![]() |
|
DOS386 12 Dec 2006, 02:16
Quote:
Mine also. But I got it working. See below. Quote:
Neither do I. Just used the code as-is, only "crippled" EDI to DI. Do not ask me how or why it works, but it seems to do for me. ![]() ESI, output in buffer, addressed by EDI/DI. Code: ;Decimal output test ;DOS executable, requires 80386 format MZ heap 0 ; no additional memory stack 4000h magic1 equ 0a7c5ac47h magic2 equ 068db8badh push cs pop ds jmp short @f sillytext db 'Decimal test. (CL?) ??? by ???. This program is silly. It counts from 0 to 4294967295',0Dh,0Ah,0Dh,0Ah,24H @@: mov AX,0900h mov dx,sillytext int 21h mov di,labelend+4 mov dword [labelend],0 ; start counting at 0 mov byte [labelend+14],0Dh mov byte [labelend+15],0Ah mov byte [labelend+16],24h @@: mov eax,[labelend] mov esi,eax call near decout ;convert mov AX,0900h mov dx,labelend+4 int 21h ;print to screen inc dword [labelend] jnz @b mov ax,4C00h ; exiting here after 2^32 loops _________________ Bug Nr.: 12345 Title: Hello World program compiles to 100 KB !!! Status: Closed: NOT a Bug |
|||
![]() |
|
zir_blazer 14 Dec 2006, 19:21
That doesn't help me at all, as it is too hard for me to understand and I can't figure out what to do with it. I'm needing a well commented code that explain step-by-step how to retrieve readable data (I don't care that it is in Binary, Decimal or Hexadecimal for as long that it is not in machine code) instead of garbage when using DOS interruptions that writes data on Registers, and I can't manage to find something like this in the tutorial or source codes that I checked.
|
|||
![]() |
|
Matrix 04 Feb 2007, 08:56
zir_blazer wrote: That doesn't help me at all, as it is too hard for me to understand and I can't figure out what to do with it. I'm needing a well commented code that explain step-by-step how to retrieve readable data (I don't care that it is in Binary, Decimal or Hexadecimal for as long that it is not in machine code) instead of garbage when using DOS interruptions that writes data on Registers, and I can't manage to find something like this in the tutorial or source codes that I checked. hello, please read this reference, [ DOS Frequently Asked Questions (FAQ) ] you need to output integers to text screen, also go here: i wrote a Sample code for Outputting integers and here: Writing text Prints garbage, Need help |
|||
![]() |
|
roboman 04 Feb 2007, 10:19
I was working on that myself and just uploaded some sample code to the DexOS forum. It'd FASM, but writen for DexOS. http://jas2o.forthworks.com/dexforum/index.php?topic=232.0
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.