flat assembler
Message board for the users of flat assembler.
Index
> Windows > equivalent fasm code |
Author |
|
ISP 13 Jan 2014, 20:07
hello every body, how can i edit following very simple assembly example
that run with fasm and work in windows 8.1 without dosBox.('') PAGE 110,100 TITLE 'EXAMPLE1.ASM' add two ASCII ;----------------------------------------------- ; Defining segment of program ; --------------------------- CODESG SEGMENT ASSUME SS:CODESG,DS:CODESG,CS:CODESG ORG 100H START: JMP MAIN ;1-Jump over data ; ; 1- Define data ; -------------- DATA1 DB 35H DATA2 DB 32H DATA3 DB ? ; ; 2- The rest of instructions ; --------------------------- MAIN PROC NEAR MOV BL,DATA1 ;2- Move 35h to BL SUB BL,30H ;3- Change to binary MOV AL,DATA2 ;4- Move 32 to AL SUB AL,30H ;5- Change to binary ADD AL,BL ;6- Add BL to AL MOV DATA3,AL ;7- Store sum in DATA3 ; MOV AX,4C00H ;8- End of INT 21H ;9- processing MAIN ENDP ; End of procedure CODESG ENDS ; End of segment END START ; End of program [/code]
|
|||||||||||
13 Jan 2014, 20:07 |
|
revolution 14 Jan 2014, 08:56
baldr wrote: Perhaps resulting .COM would run under 32-bit Windows 8. |
|||
14 Jan 2014, 08:56 |
|
baldr 14 Jan 2014, 12:21
revolution,
That's funny, I've run that prog under 16-bit debug.exe in 32-bit Windows 7 HB before posting. AFAIK VDM support was dropped in 64-bit Windows since XP. |
|||
14 Jan 2014, 12:21 |
|
AsmGuru62 14 Jan 2014, 14:41
I think a simple Console app will be able to run OK.
Just it has to be recoded to use Console API. |
|||
14 Jan 2014, 14:41 |
|
sinsi 14 Jan 2014, 20:02
VDM was omitted for 64-bit Windows, supposedly long mode doesn't support v86.
|
|||
14 Jan 2014, 20:02 |
|
baldr 14 Jan 2014, 21:32
AsmGuru62,
What kind of Console API does it need? ExitProcess()? |
|||
14 Jan 2014, 21:32 |
|
revolution 14 Jan 2014, 22:38
baldr wrote: revolution, |
|||
14 Jan 2014, 22:38 |
|
AsmGuru62 15 Jan 2014, 03:16
I missed that one.
I thought that small DOS code prints the result on console! How one can prove that this code works? I wish to see that 5+2=7 on console. Otherwise, it is just moving stuff in memory. |
|||
15 Jan 2014, 03:16 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.