Search found 16 matches
Re: Assembler
This code switches the assembler to Intel-no prefix syntax to avoid the more difficult AT&T-prefix syntax, and then switches back to the AT&T-prefix syntax that GCC expects. And I declared x as DIM SHARED so it would have an accessible, easy to predict name. So far I have not found any reas...
Assembler
Simple example:
working in 32 bit compiler, but in 64 bit compiler no.
Why?
Corect syntax in 64 bit?
Code: Select all
Dim X As Short
X = 5
Print "X = "; X
Asm
mov ax, [X]
inc ax
mov [X], ax
End Asm
Print "X = "; X
Sleep
Why?
Corect syntax in 64 bit?
- Oct 15, 2011 19:23
- Forum: Sources, Examples, Tips and Tricks
- Topic: Ellipse
- Replies: 12
- Views: 2879
comparative test
After I received several proposals for the algorithm of ellipse, I made a comparative test: Ivan, Zagreb Frisian TJF Dodicat H4TT3N #Include Once "cairo\cairo.bi" Dim SHARED AS cairo_t PTR cr CONST Pi = 3.141592653589793 Const Pi_div_2 = Pi / 2 Sub ellipse_H(byval x as single, byval y as s...
- Oct 10, 2011 18:16
- Forum: Sources, Examples, Tips and Tricks
- Topic: Parabolic Mirror/Shape
- Replies: 12
- Views: 2304
Re: Parabolic Mirror/Shape
error 24: File not found, "mem.bas" in '#Include Once "mem.bas"the adjuvant 1 : [easy.bas]Code: Select all
#Include Once "mem.bas"
No "mem.bas" in my computer :(
- Oct 08, 2011 12:44
- Forum: Sources, Examples, Tips and Tricks
- Topic: Ellipse
- Replies: 12
- Views: 2879
- Oct 07, 2011 21:00
- Forum: Sources, Examples, Tips and Tricks
- Topic: Ellipse
- Replies: 12
- Views: 2879
Try ... Mind the different line width and subpixelshading. You can use patterns for the lines. You can draw segments of the elipsis (arc) and you can fill them with colors or patterns or with an image. You also can use patterns or images for the border. And it's pretty fast (hardware-accellerated b...
- Oct 07, 2011 20:41
- Forum: Sources, Examples, Tips and Tricks
- Topic: Ellipse
- Replies: 12
- Views: 2879
Hello there, Nice little program, but there is room for speed optimizations. It is important that you have as few calls to cpu-expensive functions such as sqr(), tan(), sin(), and cos() as possible, especially inside loops or nested loops. Preferrably none at all. Ellipse drawing functions have bee...
- Oct 07, 2011 20:31
- Forum: Sources, Examples, Tips and Tricks
- Topic: Periodic Table of Elements
- Replies: 7
- Views: 1325
- Oct 07, 2011 17:27
- Forum: Sources, Examples, Tips and Tricks
- Topic: Periodic Table of Elements
- Replies: 7
- Views: 1325
Periodic Table of Elements
By clicking the elemnt shows the image of the atom. Clicking on the flag, changing the language. This program can be useful and for someone who is not interested in programming (pupil, student, physics, chemistry ...) Const Pi = 3.141592653589793 Const s = 37 , p = 44 , d = 42 , f = 103 Const Lj = 4...
- Oct 06, 2011 19:49
- Forum: Sources, Examples, Tips and Tricks
- Topic: Ellipse
- Replies: 12
- Views: 2879
Ellipse
In FreeBASIC, there is a command that can draw circle and an ellipse when it is in the sixth argument, enter a number other than one. The entered number determines how many times the vertical radius larger or smaller than the horizontal. In this way it is possible to draw a vertical or horizontal el...
- Oct 06, 2011 19:41
- Forum: Sources, Examples, Tips and Tricks
- Topic: Alignment draw string
- Replies: 4
- Views: 1221
I'm here to learn English as well. And my knowledge is based on pre-DOS area (CBM PET / 2008 - end of the 70's). But I don't like to invent the weel twice and FreeBasic is a good basis to use powerful libraries. The easiest way to use PangoCairo is in combination with GooCanvas. Find an example her...
- Oct 06, 2011 18:34
- Forum: Sources, Examples, Tips and Tricks
- Topic: Alignment draw string
- Replies: 4
- Views: 1221
Hi Ivan, Zagreb! You wrote a lot of code. Why don't you use PangoCairo and UTF-8 character encoding? It's much easier to code. And you can use all system fonts with font attributes, like ie Streched / Condensed bold / italic underlined (single / double / low) strike-trough ... It's just a piece of ...
- Oct 06, 2011 12:29
- Forum: Sources, Examples, Tips and Tricks
- Topic: My filebrowser
- Replies: 24
- Views: 5601
File Browser
It works with Windows.
Develop it further.
Develop it further.
- Oct 06, 2011 11:57
- Forum: Sources, Examples, Tips and Tricks
- Topic: Alignment draw string
- Replies: 4
- Views: 1221
Alignment draw string
"Slova_HR.bas" is part of bigger project which I will put later. For now, he might be a useful alone. Slova_HR.bas ' Subroutine for print characters on the screen #Define HR Y 'Who does not need the Croatian characters can rem this line of code Declare Sub Ispis(As Integer, As Integer, As ...
- Oct 05, 2011 6:38
- Forum: Sources, Examples, Tips and Tricks
- Topic: Pendulum waves
- Replies: 9
- Views: 2872
Here's a link: http://www.youtube.com/watch?v=yVkdfJ9PkRQ last version with comment in English: Dim As integer i, j, k, X, Y, S, M, B(8), BB(9), MM, BK ' BK - Number of balls; B - Color; BB- Color number Dim As String Sl Dim As Integer Ptr Li Dim As Double Ptr Ld Dim As Double T ScreenInfo X, Y ' Ta...