flat assembler
Message board for the users of flat assembler.
Index
> DOS > noob questions |
Author |
|
vid 09 Nov 2005, 22:00
you must specify more for those funcs. how is the string ended (0 or $)? where it is stored? how is it with buffer size for sin?
To your example: "display" is assembler directive, so you can't use it as label |
|||
09 Nov 2005, 22:00 |
|
xddxogm3 09 Nov 2005, 22:06
Thanks for the fixing the issue with my module.
Is there a list of all reserved words in FASM? I would love to know what I can and can not use. I have the compiler manual and tutorial, but is there anything beyond what is in that documentation? I'm not sure what you mean with the questions. I do not have the internal workings of the dout ;decimal output to screen aout ;ascii output to screen din ;decimal input sin ;string input These are just given as directives for an Assembly simulator called H1. As for my strings when they are used I'm usually using a null termination, except it looks like you have to use 24h to terminate the strings in FASM Another question I have is how would you use prebuilt assembly files in another assembly program? I'm looking for the capability of hacking up someones code, so I can store a specific procedure into one module, then save this module or perhaps a collection of modules on one assembly file, then include it into my file for easy access. similar to header usage in c++ when getting a character from the keyboard, is the input always concidered the ascii value of the key? i.e. I wan the person to input a number. will fasm read it in 25 as the keys pressed '2' and '5' or to be exact ascii hex values of 32 and 35? so would it not also be accurate to say that it would store 32 at one memory address and 35 at another, hopefully sequential or at least mapped together. I hope that made since to someone. |
|||
09 Nov 2005, 22:06 |
|
vid 09 Nov 2005, 22:48
please place empty line between parts, it is easier it read
xddxogm3 wrote: Is there a list of all reserved words in FASM? hmmm... you can use documentation (strip all ""ed words from there), or look at sources end of files format.inc, parser.inc, preproce.inc, x86.inc. Problem is that reserved words include instructions, operators, etc. I suggest reading fasm documentation by time. Quote:
hmmm... nothing up-to-date i think. but you have this forum where you can always ask, it's quicker than finding out by yourself Quote: ..These are just given as directives for an Assembly simulator called H1. what is that? does it simulate x86 assembly? Quote: As for my strings when they are used I'm usually using a null termination, except it looks like you have to use 24h to terminate the strings in FASM. FASM doesn't know a thing about strings, FASM is assembler and assembler is just another syntax for machine language (opcodes, binary). String convention depends on routine which operates with strings, and for some reason microsoft decided to use string terminated with '$' (24h i think) for their DOS service int 21h / ah=9. They also use null-terminated (ASCIIZ) string elsewhere. So this is matter of DOS. Quote:
code has to be written to allow this. In fasm, whole source is just one big text file (well, it can be divided into more files and merged with "include" directive). So your routine can access some variable defined elsewhere. But if you know code is written in this way then you can use copy-paste . assembly language doesn't have any restrictions to your code (like forced modularity in object-oriented language like C++), so you can't always do things like that. Quote:
again, as with string output, it depends on method you use to read input. there is bios service which reads one key, dos service which reads one char from stream (eg. from stdin, eg. from keyboard), dos service which reads data into buffer, etc. |
|||
09 Nov 2005, 22:48 |
|
xddxogm3 09 Nov 2005, 23:15
Quote: it depends on method you use to read input. What are the different methods, and were can I find more details on this? Quote: what is that? does it simulate x86 assembly? It is similar in some ways, but alot of the procedures are automated and less involved then what I have seen of real assembly. This is basically all I know about the version of assembler. Machine-level Assembler Version 5.0 Copyright (c) 2005 A. J. Dos Reis |
|||
09 Nov 2005, 23:15 |
|
vbVeryBeginner 12 Nov 2005, 07:51
Quote: I do not have the internal workings of the you can use debugger to unassemble and see wat they really did. |
|||
12 Nov 2005, 07:51 |
|
xddxogm3 12 Nov 2005, 20:22
good point.
i think i will do that then. thanks. |
|||
12 Nov 2005, 20:22 |
|
vid 14 Nov 2005, 16:03
Quote: What are the different methods, and were can I find more details on this? you can use DOS service 10 (int 21h / ah=0Ah) http://spike.scu.edu.au/~barry/interrupts.html#ah0a for example, or use any of zounds character input routines and write your own string input handler |
|||
14 Nov 2005, 16:03 |
|
peter_rk 27 Nov 2005, 08:19
The reason your program did not work was because one of the variables you tried to use, "display", is a FASM-specific and reserved. In changing the program, I just substituted "display2" for "display." FASM was happy , and it let program execution.
Code: org 100h Main: call display2 mov AH,8 ;My code, so program int 21h ; stays on screen until keypress int 20h display2: mov ah,9 ;move instruction 9 (print characters) into ah register mov dx,@m0 ;move address of string into dx register int 21h ;executes interupt (print up to 24h) ret @m0 db "Module Test",24h ;always have a banner Also... I do n't know what you mean by "pre-built" assembly files. But it sounds like you want to include another file. It's pretty easy to do. Go to the part of your pogram where you want to include another file. Then type: Code:
include 'whatever'
Replacing 'whatever' with the file you want to include. |
|||
27 Nov 2005, 08:19 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.