Search found 16 matches

by Ivan, Zagreb
Oct 11, 2014 21:23
Forum: General
Topic: Assembler
Replies: 4
Views: 634

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...
by Ivan, Zagreb
Oct 10, 2014 17:36
Forum: General
Topic: Assembler
Replies: 4
Views: 634

Assembler

Simple example:

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

working in 32 bit compiler, but in 64 bit compiler no.
Why?
Corect syntax in 64 bit?
by Ivan, Zagreb
Oct 15, 2011 19:23
Forum: Tips and Tricks
Topic: Ellipse
Replies: 12
Views: 1647

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 ...
by Ivan, Zagreb
Oct 10, 2011 18:16
Forum: Tips and Tricks
Topic: Parabolic Mirror/Shape
Replies: 12
Views: 1349

Re: Parabolic Mirror/Shape

the adjuvant 1 : [easy.bas]

Code: Select all

#Include Once "mem.bas"

error 24: File not found, "mem.bas" in '#Include Once "mem.bas"
No "mem.bas" in my computer :(
by Ivan, Zagreb
Oct 08, 2011 12:44
Forum: Tips and Tricks
Topic: Ellipse
Replies: 12
Views: 1647

TJF wrote: ...
Or you can use a GTK installer to perform the Cairo installation (and all depencies) for you:
...
I did it. It works. :-)
Thanks!
by Ivan, Zagreb
Oct 07, 2011 21:00
Forum: Tips and Tricks
Topic: Ellipse
Replies: 12
Views: 1647

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...
by Ivan, Zagreb
Oct 07, 2011 20:41
Forum: Tips and Tricks
Topic: Ellipse
Replies: 12
Views: 1647

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...
by Ivan, Zagreb
Oct 07, 2011 20:31
Forum: Tips and Tricks
Topic: Periodic Table of Elements
Replies: 7
Views: 748

Nice :) Just a couple of gripes, but I'm impressed overall. A couple of spelling errors in English: "shell" and "electron". I like the way it adapts to the screen size. although it was still too tall for my screen including the taskbar. I'd be happier with a comfortable margin, say 3/4 of the scree...
by Ivan, Zagreb
Oct 07, 2011 17:27
Forum: Tips and Tricks
Topic: Periodic Table of Elements
Replies: 7
Views: 748

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...
by Ivan, Zagreb
Oct 06, 2011 19:49
Forum: Tips and Tricks
Topic: Ellipse
Replies: 12
Views: 1647

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...
by Ivan, Zagreb
Oct 06, 2011 19:41
Forum: Tips and Tricks
Topic: Alignment draw string
Replies: 4
Views: 572

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...
by Ivan, Zagreb
Oct 06, 2011 18:34
Forum: Tips and Tricks
Topic: Alignment draw string
Replies: 4
Views: 572

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) &sd...
by Ivan, Zagreb
Oct 06, 2011 12:29
Forum: Tips and Tricks
Topic: My filebrowser
Replies: 24
Views: 3019

File Browser

It works with Windows.
Develop it further.
by Ivan, Zagreb
Oct 06, 2011 11:57
Forum: Tips and Tricks
Topic: Alignment draw string
Replies: 4
Views: 572

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 String...
by Ivan, Zagreb
Oct 05, 2011 6:38
Forum: Tips and Tricks
Topic: Pendulum waves
Replies: 9
Views: 1361

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 Scre...

Go to advanced search