flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > Tinypad improvements, etc

Author
Thread Post new topic Reply to topic
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 28 Jul 2004, 06:22
I have been working on a version of Tinypad these past few weeks.
Since tinypad seems to be the most used and most important of the programs
on MeOS, i decided to work out alot of its bugs and add some room for expansion.
I do all my ASM in menuet itself... I find it mutch ore advantageous because working so
mutch with the system you start to notice all those sneaky bugs...

Whilst making improvements in Tinypad I developed the start of a GUI.INC file which
I hope will grow to contain most of the source to build common widget type things...
(perhaps in the future it can be split as to allow more efficient use of parts)

But for the moment right now GUI.INC supports an 'object-ish oriented' style in which
you can build textboxes and send events to them.

I have used two of these text boxes in Tinypad as proff of feasability... they replace the
non-backspacing, arrow-blank-spacing, sad excuse for textboxes that tinypad had...

I have also added the file PLUGINS.INC to tinypad as a place in which to add more tools to
Tinypad instead of letting them pile at the type like they were...

Tinypad might do well as the first native IDE (not ported or otherwise) for menuet.

to keep my post short.. ill make a list of improvements to Tinypad.
1. Plugin file
2. GUI file
3. extreme improvement of text boxes...
4. Slider bar to indicate file position (perhaps clickable later..)
5. Cursor colors to air in visability...
6. plugin to mark lines in source or other files and then return to with ctrl-tab
(note bugs still exist in this... though they arent harmful)
7. the beginings of a color dialog box... NOTE this should be put into GUI.INC and objectified...
8. the beginings of point and click cursor movement... not active, but included in souce

hmm.. thats about it off the top of my head... post back to me with updates/bug reports...
feel free to post ideas for IDE plugins.. etc...
Wishing

-Note to ivan: perhaps we can arrange some email conversation? Smile

NEW FILES BELOW!!!

_________________
446f6c7068696e


Last edited by Wishing on 05 Aug 2004, 07:14; edited 1 time in total
Post 28 Jul 2004, 06:22
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 28 Jul 2004, 14:02
Very good job !!

--
A little suggestion for the gui objects: using meaningful constants (and macros) could ease readability and permit reducing comments.
Post 28 Jul 2004, 14:02
View user's profile Send private message Yahoo Messenger Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 29 Jul 2004, 04:45
Reduceing comments in Assembly source code... is probably not something
anyone in their right mind should suggest Wink

I agree that the comments in that source arent very complete... they should be more organized and explained. Comments in a language as coarse as assembly are a must. Without them, coming back to that source... after a few months or so.. it would take me weeks to figure out how it worked...
The GUI.INC is not finished... There are some more local methods i need to write for the textboxes... one being a thing to return the current string pointer. Another being a way to activate and de activate the textbox...
another possibly to turn on or off capitols...

with the macros idea, I would like to try it.. however i have not found a webpage listing available FASM syntax for macros.. and what things can an cannot be done... I tend to stay away from such things as to improve portability...

As far as constants go.. what constants could there be? The code is very object oriented... pointers to pointers and such... things are so fluid and dynamic that i dont see what constants could come about? what things woud be constant across a range of textboxes?

I did once try to make local constants that took the given textbox data and shuttled it to local variables... this proved difficult... it also wastes space and memory... adds excess code... with skill and thoughtfulness one can shuttle registers and stack stuff around so as to do any work needed.

Please, I am open for any suggestions as on how to improve my code.. my coding style.. or the logic behind my code... though i am happy that someone likes it... considering i started ASM coding only a few months ago Razz
Wishing

_________________
446f6c7068696e
Post 29 Jul 2004, 04:45
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
pelaillo
Missing in inaction


Joined: 19 Jun 2003
Posts: 878
Location: Colombia
pelaillo 29 Jul 2004, 12:36
Comments are a good thing, so one should take specially care. Let me explain better:
Code:
  ;LOCAL METHODS --------------
  shiftback:
    ;push edi
    mov edx,edi
    mov edi,[edx+28] ;get address of string
    add edi,[edx+16] ;add to it the cursor position
    mov esi,edi            ;copy it to start position
    inc esi                ;inc the end position
    mov ecx,dword [edx+32] ;max char length
    add ecx,2 ;adjust 2 bigger
    ;mov ecx,43 - the above two lines replaced this
    sub ecx,[edx+16]
    cld
    rep movsb
    ;pop edi
    ret
    

And this is the suggestion:
Code:
  ;LOCAL METHODS --------------
  shiftback:
    ;push edi
    mov edx,edi
    mov edi,[edx+TEXTOBJ.text]
    add edi,[edx+TEXTOBJ.cursor_pos]
    mov esi,edi
    inc esi
    mov ecx,dword [edx+TEXTOBJ.max_size]
    add ecx,2 ;adjust 2 bigger
    ;mov ecx,43 - the above two lines replaced this
    sub ecx,[edx+TEXTOBJ.cursor_pos]
    cld
    rep movsb
    ;pop edi
    ret
    

Please note that some comments such as "add to it the cursor position" are superfluous because are easy to grab it from source.

Constants replaces hardcoded numbers, so you easily change offsets without revising the entire source code (and risking to forget some one). Constants are replaced by numbers in preprocessing stage, so the code result is the same in both cases, in other words, no memory consumption.

Please consider that no criticism is intended. I like your job and I wanted to help. Wink
Post 29 Jul 2004, 12:36
View user's profile Send private message Yahoo Messenger Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 30 Jul 2004, 06:23
Comments like 'add it to the cursor position' are not superflouous at all...
if you had not looked up that the offset of 16 bytes was the cursor you mihgt not know if there was not a comment to help Wink

things like 'adjust it 2 bigger' are superflous Razz

I like your ideas and how they make things more flexible... but the code that you did not include is the code i cannot find info on and do not know how to make work.

IE.. the macro language of FASM... i dont know how to make those blah.blah references to addresses with the exception of makin each one indivudually...

Also... where would this macro code go? In GUI.INC?

no criticism intended? what good would you be doing if you did not criticise... its DESTRUCTIVE criticism that noone wants to hear Razz

By all means i appreciate your help
Wishing

_________________
446f6c7068696e
Post 30 Jul 2004, 06:23
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 02 Aug 2004, 06:45
I have discovered a bug with tinypad's new textboxes... it has to do with the filename length not being updated by the textboxes... I have fixed it and some other minor problems.... I will upload
the new sources ASAP. Also GUI.INC will have some improvements made.
first versions arent perfect Wink
Wishing
Post 02 Aug 2004, 06:45
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 05 Aug 2004, 07:05
Ok... ive fixed a bunch of bugs in Tinypad and the GUI.INC file
Ive decided to rename GUI.INC to TXBOX.INC since thats the only thing in
it. I feel that any gui stuff shouldnt be lumped together in one file...
this alows coders to pick and choose and link what they need whilst leaving out unneeded extras.

Also... Tinypad now has a 3rd plugin that alows you to adjust all the colors.
I find that a black background with green text works nicely...

The ability to switch from code mode to text mode has also been added

In TXBOX.INC (formorly gui.inc) the ability to set the focus of the textbox
has been added... this is accompanied by a method to do so.

Also the ability to highlight certain text portions in the text box is added.
Given the start character and the length in a packed int, highlighting can be
done. The highlight color cant be set (this is trivial).

A bug was fixed where the textbox never updated its own string length has
been fixed... however there are no methods to retrieve them, besides offset access.

A new code block for organizing events and return values has been added to the textboxs.

There is a bug however... in Tinypad.. I am not sure exactly where this stems from. it occurs when writing is done to the HD... the file is cut up and
wrapped around itself badly. I belive that this is due to my old kernal.
version 76 (im having trouble with kernal 77 on my lappy, anyone got one that works on toshiba?). I do not think it is my code or any in tinypad.

If others can test this version of tinypad with the file IO/saving/opening
on different kernals and report bugs back it would be greatly appreciated.

two more dwords added to Textbox datablocks.. not backwards compatable...
so dont try and use TXBOX.INC with old apps that had old textboxes... without changing them.

Wishing


Description: Keeping this here

Newer version of Tinypad.asm and Plugins.asm available in "New Moveable Icon, New Skin, Tinypad updates"

Download
Filename: TXBOX.INC
Filesize: 9.74 KB
Downloaded: 572 Time(s)


_________________
446f6c7068696e


Last edited by Wishing on 08 Sep 2004, 07:07; edited 1 time in total
Post 05 Aug 2004, 07:05
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 05 Aug 2004, 07:08
oh... forgot one thing... three new key commands have been added to the text boxes...
ctrl+s moves the start of highlighting to the current cursor positon
ctrl+e extends the end of the highlighting length
ctrl+d shortens the end of highlighting length

support for home key works... however end key doesnt work... fix it if you can...
Post 05 Aug 2004, 07:08
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Esteban



Joined: 28 May 2004
Posts: 2
Location: Buenos Aires, Argentina
Esteban 12 Aug 2004, 01:52
When I create a new file and I save(In ramdisk and in hard disk) It and reload I lose my file, I have screenshots, I'll post It later.

PD: Conditions(MeOs 0.77, P166 64 RAM HD 1.2 GB only width Menuet Os, the tinypad.asm wasn´t in the ramdisk then it not load at the start of the program)

(Sorry my english is bad Very Happy)
Post 12 Aug 2004, 01:52
View user's profile Send private message MSN Messenger Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 12 Aug 2004, 06:14
As i said... there are bugs to do with saving files... especially to HD.
I have gone over the code for saving the file many times... and i cannot
find a reason why it wont save... the code that actuall saves the file is just
a system call (5Cool...

sometimes i have had luck with using full filenames:

/rd/1/test.asm instead of test.asm and vice versa.

Tinypad is coded atm to load its own source automatically...
you can change it and recompile.. the file name is at the bottom of
tinypad.asm, if you change it.. dont forget to also change the filename LENGTH.


If anyone can track down the reason for the file saveing bug... please tell me, even if it is not a solution.
Wishing

_________________
446f6c7068696e
Post 12 Aug 2004, 06:14
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 14 Aug 2004, 06:14
NOTE: After some testing i discovered that if you press 'save' TWICE each time.. this problem does not occur... i do not know the cause... the first time it saves only parts of the file in choppped up pieces... i suspect this i a kernal issue... the second time its saved fully
Post 14 Aug 2004, 06:14
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
jdmarks



Joined: 16 Aug 2004
Posts: 9
jdmarks 23 Aug 2004, 01:01
Has anyone found the problem and corrected it yet?
Post 23 Aug 2004, 01:01
View user's profile Send private message Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 24 Aug 2004, 05:44
Nope... I havent found the cause... but i am starting to see a patern in the occurences of the problem... sometimes switiching to systree save by putting /rd/1/ in front of the filename helps... sometimes pushing the save button twice helps...

I am working on it.. and a few other aspects of Tinypad.
Features to look forward to:
1. color change panel
2. asm/text plugin
3. auto jump to error line in asm files with or without debug board.

Wishing

ps.. if anyone feels like tackling that save bug.. be my guest...

_________________
446f6c7068696e
Post 24 Aug 2004, 05:44
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
bloglite



Joined: 21 Feb 2004
Posts: 109
Location: East Tennessee U.S.A.
bloglite 29 Oct 2004, 12:09
Any new developments in tinypad?

are you using FASM 1.54 or an earlier version?

New distro soon.

to: Wishing & Ivan.............Thanks for all the improvements.

G'day, Mark
Post 29 Oct 2004, 12:09
View user's profile Send private message Visit poster's website Reply with quote
drramble



Joined: 11 Nov 2004
Posts: 2
drramble 16 Nov 2004, 10:52
Has anyone found where the file save bug comes from?

I still can't get ftps to work properly on file saving, despite some code fiddling (but I'm a bit out of practise with assembler).

If someone can point me in the right direction to track it down, it would help quite a few projects ATM.

Keep up the good work everyone!

DrRamble
Post 16 Nov 2004, 10:52
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.