flat assembler
Message board for the users of flat assembler.
Index
> Projects and Ideas > Another attempt at examples... Goto page 1, 2 Next |
Author |
|
vid 04 Dec 2007, 01:28
I think collection of good examples would be nice, and should be part of new FASM packages. But "all mnemonics" is not right approach. You have references if you are interested in all instructions. I don't see any purpose in that.
|
|||
04 Dec 2007, 01:28 |
|
edfed 04 Dec 2007, 01:30
me, i think about making a graphical animation simple debugger, something that shown the internal µP mechanisms of any instructions
for example, MOV ebx,[ebx] it will show that the value in ebx is used to access the data in memory and copy it into ebx, all with animations, and this program will be in ASM, do not speak about any other languages for this. i'll try to code an exemple. |
|||
04 Dec 2007, 01:30 |
|
kohlrak 04 Dec 2007, 01:32
Well the idea is that along with explaining the general operation better, it should be able to help compare and contrast the differences between two mneumonics which are very similar. Though, i'm sure there are a few who have absolutely no purpose anymore, which we could even create a humerous program or two to demonstrate the purposelessness of them and poke fun at them. Thing is, i find that some of these instructures appear to be useless, but end up having a hidden usage to them, and some just plain require a good bit of research just to use. My idea of this project is to loosen that up a bit so beginners have an easier time and aren't as bogged or scared when they come here and can't find help, for then they don't have to resort to google.
EDIT: Quote: me, i think about making a graphical animation simple debugger, something that shown the internal µP mechanisms of any instructions Not sure if i follow... Last edited by kohlrak on 04 Dec 2007, 01:34; edited 1 time in total |
|||
04 Dec 2007, 01:32 |
|
vid 04 Dec 2007, 01:33
edfed: this might be pretty complicated to do for x86 processors. There are some hellish instructions, there is protected mode, paging structures, etc...
|
|||
04 Dec 2007, 01:33 |
|
edfed 04 Dec 2007, 01:36
i know, that's why i said "i'll try"
now i'm planing for MOV EBX,[EBX] animation. updated! forgot this idea, too much hard for me to do now. ok for animated graphics. i don't have any program to make this, so if someone have a link to existing animations... |
|||
04 Dec 2007, 01:36 |
|
kohlrak 04 Dec 2007, 01:45
Well, if you want to try to fly off on an animated graphical view of things, then one thing to remember is a sort of screen and even a register and memory viewer. In the end, you'd be making an emulator with a debugger and graphical representation. I'd imagin a project like this would be much larger than olly... o.O
|
|||
04 Dec 2007, 01:45 |
|
LocoDelAssembly 04 Dec 2007, 01:49
I have (forced) to use MSX88 at Computer's Organization course, it does not really implement full 8086 (lack of many instructions and addressing modes), but shows how the CPU internally works cycle by cycle among with support hardware around the CPU (DMA, PIT, etc). The hardware emulation is not always realistic, in fact MSX88 is a teaching architecture with some similities with old IBM PCs.
Since seems that the authors decided to provide English version then is worth to post a link http://msx88.diatel.upm.es/bbs_msx88/english.ver/ |
|||
04 Dec 2007, 01:49 |
|
vid 04 Dec 2007, 01:51
okay, for MOV EBX, [EBX], if we exclude fetching instructions, there is:
if we decide to ignore DS shadow registers (because they are hidden implementation-specific thing), we must first load DS descriptor. It can be either in GDT or LDT. If LDT, we must first find LDT address in GDT. We must check if GDT and LDT selectors are valid (in limit), and also if descriptors are valid (bunch of stuff). After that, we can extract values from descriptors. Then, we must check if we have access rights to given segment, based on comparing bits from DS descriptor and CS descriptor (descriptor loading again?). If we don't, we must fire up exception mechanism, involving IDT, more checking, double/triple faults, etc. If we have access rights, we must calculate destination address. To get linear address, we get base from descriptor, and add it to EBX. Then in 32bit mode we must check this against limit (4096*limit if granularity bit is set). If address is out limits, exception again. Now we got linear address. If paging is enabled (involves testing CR0), we check if address is in TLB, and if not we must parse through paging structures (with exception handling, TLB reloading) which can have about different 5 formats on x86. I am sure there is much more than i mentioned. So you see, that is "pretty complicated" I was talking about. But if you manage to make some simplified version, it could be good helper for newcomers. |
|||
04 Dec 2007, 01:51 |
|
kohlrak 04 Dec 2007, 01:58
Personally, my idea behind the project is to just explain a bit of the effects on the software side, not strictly hardware. I think examples of things in fasm would be easier for some people curious on abstract and not commonly seen things like BCD or instructions that look alot alike than telling them to google.
edit: Quote: I have (forced) to use MSX88 at Computer's Organization course, it does not really implement full 8086 (lack of many instructions and addressing modes), but shows how the CPU internally works cycle by cycle among with support hardware around the CPU (DMA, PIT, etc). The hardware emulation is not always realistic, in fact MSX88 is a teaching architecture with some similities with old IBM PCs. I didn't fully test it, but it dosn't look half bad. XD Looks like a nice easy way to teach really basic assembly (for any architecture) with the safety protocol. XD |
|||
04 Dec 2007, 01:58 |
|
edfed 04 Dec 2007, 06:42
a little idea about the interface for the animation
before to make it good, i need a graphic editor for this kind of object linking normally, each item, txt, box, colors, frames, movements are completely modular and "easy" to manage.
|
|||||||||||
04 Dec 2007, 06:42 |
|
bitRAKE 04 Dec 2007, 07:19
Randy Hyde (Art of Assembly Language) has been working on this problem for years, and he says most of his students are familar with HLL's and that is why he wrote HLA. Personally, I came from the hardware end of things - learnt electronics before assembler. Which was good because most of the documentation on low-level stuff comes from that direction, imho.
I read about every instruction and then worked through programming examples line-by-line -- looking back at instructions I did not remember, or wasn't sure about. Every instruction becomes well known in time. Once I felt comfortable with a few instructions I started creating my own programs: fractal plotters,game menu,etc... Back then we all took other people software apart, too. There are so many instructions now that maybe people get overwhelmed at first. Some people have the right idea to stick with a small subset, but it needs to be sufficient to begin producing results for positive feedback. |
|||
04 Dec 2007, 07:19 |
|
edfed 04 Dec 2007, 07:51
me too, i come from real hardware, mainly pure analog electronics.
hand made amplifiers, switching power supply, transfert functions, TTL 50V, and others are my element. asm coding is like connecting transistors for me. but i try to make the more abstraction as possible, like accessing dictionnaries in asm to make a language interpret, grouping memory portions to transform them into various things, access drive and ram with a file system... in informatics, hardware and software are both the most important things. cannot make a very good programm without knowledge about hardware capabilities. cannot make a very good hardware without knowledge about what to do with, and how to do. there are 3 principal layers. _ electronic hardware _ machine language, the mechanisms. ASM _ abstract software asm layer is the link between the two others. first layer is the machine , the other is us. note: MSwindows and many other OSes only use the third layer, the two others are frozen and never touched. this make actual software really far of real hardware. i am tired, 8:50 AM for me, so i'll sleep, and see if it good to continue the simulator program this afternoon. see you later. |
|||
04 Dec 2007, 07:51 |
|
kohlrak 05 Dec 2007, 00:29
Quote: MSwindows and many other OSes only use the third layer, the two others are frozen and never touched. this make actual software really far of real hardware. And that's why computers are expensive. You're constantly upgrading because of this. I come from high level down to assembly. I like assembly. It has this concept of FREEDOM. Quote: There are so many instructions now that maybe people get overwhelmed at first. Some people have the right idea to stick with a small subset, but it needs to be sufficient to begin producing results for positive feedback. This is correct... What i don't like about Hyde is HLA and the fact that the assembly books these days are based on DOS, not windows or linux or mac which most of us will now be programming on. Constantly setting up a DOS emulator to run our newly compiled program is getting old. We need something a little more current. |
|||
05 Dec 2007, 00:29 |
|
edfed 05 Dec 2007, 01:14
Quote: we need something a little more currennt as in early ages of PC, when DOS programming guide was hard to obtain, the actual documents are hard to obtain. that's why i invoke the maximum FASM forum to join a big project that will, at the end, give us a complete, easy to use, exaustive fasmos platform to code and link to other OSes. it's possible to do. with the actual knowledge, building an OS is not as complex as the first OS time. we know what we want, what are the problems while using OSes. the fact that MS has the market is that they are the first to provide a popular easy to learn OS. like in the early ages of CAR industry, only few constructors existed. now, car industry is world wide implanted, thare are a lot of brands and car models. not only RENAULT, FORD and CITROËN. if we ( all fasm forumers) join our efforts to make this, it can be achieved during 2008. providing a revolutionary FASMOS, open source, free to use, GPL, etc ... menuet OS is a proof that it's possible. DEX4U is another ... but in fact, we don't need an OS name, we need a really good platform to break the fatality of MS tyrany. LINUX and UNIX are good options but it's mainly for purist, very hard to use for "mister everybody". |
|||
05 Dec 2007, 01:14 |
|
kohlrak 05 Dec 2007, 01:19
One problem, the hardware companies won't support (or not many will) our OS with their hardware. In the end, we really don't have much of a leg over ms other than a faster computer with the hardware that is supported. You need to make the OS appealing, especially to program on. Speed's not going to cut it. It has to be pretty, as well, and hardware will need to be supported. The biggest hump of any project like that will be getting the hardware supported.
|
|||
05 Dec 2007, 01:19 |
|
edfed 05 Dec 2007, 01:33
with asm, everything is possible, as directlly using windows drivers for your own OS.
i'm sure that there are coder in this forum that can do that porting. if we make a really good start of such a project, people will follow, and then manufacturer will then follow. i'm trying to obtain the CREATIVE programmer reference manuals, but they don't want to give oit to me. since two weeks, i ask them for that, and since TWO weeks, they always argue with bad arguments. i'll see in 2 mounth, if they are bored of my harcelement, they probably finish to attack me on justice, but i have my conscience for me. did you sign my petition? at heap/petition VS creative? i start with creative, but i have in project to force other manufacturer to give us the right to code with freedom. 2007 but like middle-age, we need to remember that humanity must be united or will die. i know it's not important as the hungry in somalia. but all in all, it will bring us more good freedom, and then more humanity in this money money world. i hope that you (all fasm forumers) will follow me in my fight against these problems. |
|||
05 Dec 2007, 01:33 |
|
bitRAKE 05 Dec 2007, 01:50
Intel makes their hardware info public: CPU, Chipset, Video, etc... (there are others as well, search for Open Hardware). It is the way of the future - nothing to profit from secretive practices. NVidia remains stubborn still, but some ATI docs are public. I will only buy hardware that is open because other stuff doesn't have a future.
It is programmed obsolescence when they strictly control the hardware and software. Why update the drivers when there is new hardware to sell? Instead of working to expand the feature-set of current hardware their business model stops development, and prevents others from taking business away from them. |
|||
05 Dec 2007, 01:50 |
|
LocoDelAssembly 05 Dec 2007, 01:55
Reminder: This is not the Heap forum.
|
|||
05 Dec 2007, 01:55 |
|
edfed 06 Dec 2007, 16:28
yes, it's not the heap, but:
the lack of good tut and documents for mister everybody is a problem. before to make good examples, we need to know exactlly what kind of examples to make. for the tut, what to explain, etc etc... |
|||
06 Dec 2007, 16:28 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.