flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3 Next |
Author |
|
LocoDelAssembly 25 Oct 2008, 17:51
Quote:
Right, but remember that addressing in real mode is calculated as segment*16 + offset, then, for example, 9FFF:0010 = A000:0000 |
|||
![]() |
|
Chewie RFC 25 Oct 2008, 18:03
LocoDelAssembly wrote:
Fvck me... thanks dude, I appreciate it. Makes sense now! But what prevents it from writing to 9FFF:0000-9FFF:000F? It seems like eventually it'd get there and that's DOS memory. |
|||
![]() |
|
LocoDelAssembly 25 Oct 2008, 19:15
A very fatal scenario
![]() I let the real DOS programmers comment more about this now ![]() |
|||
![]() |
|
sinsi 05 Nov 2008, 05:04
neville wrote: Can anybody write a paged VESA version of my linear VESA code above in less than 66 bytes? I don't expect it to run faster, just smaller code 33 bytes? Code: format binary as 'com' org 100h mov ax,4f02h mov bx,101h int 10h push 0a000h pop es sub bx,bx paint: adc ax,cx stosb loop paint mov ax,4f05h int 10h add dl,16 ;assumes 4K granularity - use inc dl for 64K loop paint ret [rant] How does centrelink expect me to apply for jobs 5 days a week/7 hours a day ? there are only so many jobs advertised each day. wow I am seriously b o r e d here. [/rant] |
|||
![]() |
|
windwakr 05 Nov 2008, 14:26
^that assembles to 30 bytes and doesn't run on my computer.
|
|||
![]() |
|
sinsi 05 Nov 2008, 22:19
It was programmed on an old P100 with a cirrus logic 5436 (?) and nt4.
Changing "add dl,16" to Code: inc dl and dl,0fh makes it work on a q6600/8800gt |
|||
![]() |
|
edfed 05 Nov 2008, 23:13
assemble in many bytes, but don't use keyboard bios or dos interrupt.
Code: org 100h call newint9 mov ax,13h int 10h les ax,[bx] @@: sbb ax,di pushf cmp byte[key+key.cur],key.echap je @f popf stosb inc di jmp @b @@: call oldint9 ret include 'int9/int9/int9.inc' |
|||
![]() |
|
windwakr 06 Nov 2008, 02:31
I would suggest replacing the "ret" in the above code with
Code: mov ax,04C00h int 21h because with ret it just crashed on quit for me.....also for the mentioned int9.inc you should tell people where to get it. You have it included in the download IN THIS THREAD. |
|||
![]() |
|
edfed 06 Nov 2008, 18:07
my dear windwakr, int 21h is a dos interrupt and i never use any dos interrupt since i've wrote my own int9.
why have i wrote my own int9? because it have a special feature, it will put the last scancode in a pipeline, and set the byte corresponding to the key ( up to 256 keys) and then, you just have to read the value of the key in the keymap. why don't i use mox ax,04C00H int 21h? because a simple ret combined with optional mov ax,3, int 10h before is enough for me and don't depend on dos ints. you can use any of the int9 folders i've uploaded. or use this one specially made for 16bits
|
|||||||||||
![]() |
|
baldr 06 Nov 2008, 18:47
edfed,
ret depends on stack being balanced and int 0x20 @ cs:0 (usually comes from PSP:0). And you're proclaiming that you edfed wrote: never use any dos interrupt since i've wrote my own int9. ![]() As to int9.zip sources: definitely comments are scarce. It's much easier to disassemble int9.bin with IDA (for xrefs and such). By the way, handler is stateless? It accepts any of the six bytes for "Pause" key in the similar manner, without check? |
|||
![]() |
|
edfed 06 Nov 2008, 19:44
i recognise, i have some problems to find an efficient way to understand pause.
i will use the mode3 one day, and it will be simpler. mode1, the one used by all pc, bios & my int9 ![]() mode2, a littel like mode1, but better. mode3, the best, and less documented, why??? in mode 3, it is logic, only one code / key. one scancode if make, two if break( breakcode+ scancode). then, translate all thecodes in a logical way, escape = 1, f1 = 2, f2 = 3 etc etc. then, it will be much simpler and LOGIC. about the coments, i putted labels, it is not for fun, it is the comments. if you want to understand the code, read it. |
|||
![]() |
|
baldr 06 Nov 2008, 20:44
edfed,
Bitmap the pressed keys, queue their interpretation. Make the interpretation configurable. Once upon a time I'd programmed NumLock as another shift (remember IBM PC 83-key 'board?). The only use for alternate modes is to make keys non-typematic. WASD in first-person shooters generate too much unnecessary traffic (and interrupts, that's the point ![]() |
|||
![]() |
|
Coddy41 21 Jan 2009, 22:45
Can Some one explain what this dose? I was able to compile it, And see it
but Im new at anything but C. use16 org 0x100 mov ax,0x13 int 0x10 push word 0xA000 pop es paint: adc ax, cx stosb loop paint inc ax jmp paint Please ![]() |
|||
![]() |
|
bitRAKE 22 Jan 2009, 05:03
Code: ; tell FASM we doing the 16-bit thing use16 ; tell FASM where IP and code/data are located in memory org 0x100 ; tell BIOS we want graphics mode mov ax,0x13 int 0x10 ; this is where the screen memory is for gfx push word 0xA000 pop es ; endless loop writing to screen memory paint: adc ax, cx stosb ; write to ES:DI loop paint inc ax jmp paint |
|||
![]() |
|
Coddy41 22 Jan 2009, 11:39
oh, that realy helps, thanks
![]() |
|||
![]() |
|
Coddy41 19 Apr 2009, 20:32
I wonder If there is a way to rewrite it from 17 bytes and use alot more
Hex to make it smaller ![]() |
|||
![]() |
|
asmdemon 20 Apr 2009, 01:04
Here is my compo entry for EFnet's ASM compo #9. Very similar program. The actual entry, hell, won that competition. I modified it one day to include exit on keypress.
_________________ It is better to be on the right side of the devil than in his path. |
|||||||||||
![]() |
|
revolution 20 Apr 2009, 02:00
Coddy41 wrote: I wonder If there is a way to rewrite it from 17 bytes and use alot more |
|||
![]() |
|
Coddy41 20 Apr 2009, 17:26
oh, yeah, good point... well right now it is at 12 bytes and is cut into 4
sections on the screen, If it only used 1 section could it use less bytes? @asmdemon: I like the one titled "Hell" it is very mezmorizing @_@ |
|||
![]() |
|
Goto page Previous 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.