Search found 89 matches

by I3I2UI/I0
Jan 20, 2017 12:52
Forum: Beginners
Topic: How to "reverse" a byte?
Replies: 69
Views: 11524

Re: How to "reverse" a byte?

If you're using EAX on a x64-CPU, you'll get a ASM-Error: similar to "wrong word size, dword instead of qword" (even with push/pop). One could only replace it, with: RAD (RAX - low dword). Of course, I can also use in FB64 eax, ax, ah, al as a register without ASM-Error. FB1050_64 'dies l...
by I3I2UI/I0
Jan 19, 2017 22:18
Forum: Beginners
Topic: How to "reverse" a byte?
Replies: 69
Views: 11524

Re: How to "reverse" a byte?

@ MrSwiss mirror8 runs under FB 32/64 Bit only with 64Bit variables you need 2 versions. #Macro mirror64(Variable) If SizeOf(Variable) = 8 Then #Ifdef __FB_64BIT__ Asm mov rax, [Variable] mov rbx, 0 mov ecx, 64 1: rcr rax rcl rbx dec ecx jnz 1b mov [Variable], rbx End Asm #Else Asm mov eax, [Variabl...
by I3I2UI/I0
Jan 18, 2017 17:49
Forum: Beginners
Topic: How to "reverse" a byte?
Replies: 69
Views: 11524

Re: How to "reverse" a byte?

Hi Luis, a fast way: 'bitweise gespiegelt (abcde... -> ...edcba) #Macro mirror8(Variable) Asm mov al, [Variable] mov bl, 0 mov cl, 8 1: rcr al rcl bl dec cl jnz 1b mov [Variable], bl End Asm #EndMacro Dim As UByte zahl = &b00111011 Print Bin(zahl, 8), zahl mirror8(zahl) Print Bin(zahl, 8), zahl ...
by I3I2UI/I0
Jan 11, 2017 19:26
Forum: Sources, Examples, Tips and Tricks
Topic: Reverse a string
Replies: 14
Views: 2489

Re: Reverse a string

Hi, as asm Function Revers (ByVal txt As String) As string Dim lt As Long Dim As String Text = txt lt = Len(Text) If lt > 1 Then asm mov eax, [Text] 'Anfang des String im RAM mov ebx, [lt] 'Laenge des String mov esi, eax add eax, ebx dec eax mov edi, eax 'letzes Zeichen des String mov ecx,ebx shr ec...
by I3I2UI/I0
Apr 18, 2015 14:27
Forum: Sources, Examples, Tips and Tricks
Topic: analog clock
Replies: 9
Views: 2552

Re: analog clock

by I3I2UI/I0
Jan 29, 2015 13:29
Forum: Sources, Examples, Tips and Tricks
Topic: Implementing Vector Fonts
Replies: 13
Views: 3047

Re: Implementing Vector Fonts

a QB - FB vector font: ScreenRes 640,100 Dim Shared Zeichen(32 To 252) As String Zeichen(32) = "BR4"'space Zeichen(33) = "BD U BU U7 BD8 BR4"'! Zeichen(34) = "BU7DD BR2UU BD7 BR3"'" Zeichen(36) = "FRREUUHLLHUUERRF BH BL BUD10 BU2 BR6"'$ Zeichen(38) = &quo...
by I3I2UI/I0
May 28, 2013 19:01
Forum: Beginners
Topic: Access to pixels image
Replies: 12
Views: 2068

Re: Access to pixels image

&hff00 -> p[y] += 1 -> &hff01 = green
&hffFF -> p[y] += 1 -> &hff00 = green, the same color.
by I3I2UI/I0
May 27, 2013 8:30
Forum: Beginners
Topic: Print (font) size
Replies: 3
Views: 1371

Re: Print (font) size

#Include Once "windows.bi" 'ab Windows Vista Function Set_ConsoleFont(typ As Integer) As Integer Dim As Any Ptr Kernel32 Dim As Integer tmp Dim SetConsoleFont As Function(ByVal As HANDLE, ByVal As Integer) As Integer Kernel32 = DylibLoad("Kernel32.dll") If Kernel32 Then SetConso...
by I3I2UI/I0
Apr 22, 2013 8:04
Forum: Beginners
Topic: Solved!Lines in a txt file
Replies: 5
Views: 1191

Re: Lines in a txt file

Hi STBasic Dim As String filename, lf="main.txt" filename = Dir("*.exe") Open lf For Output As #1 Do While Len(filename) Print #1, filename filename = Dir() Loop Close #1 Dim As String t() Dim As Integer i Open lf For Input As #1 Do until EOF(1) i+=1 ReDim t(i) Input #1,t(i) ? i,...
by I3I2UI/I0
Mar 24, 2013 14:51
Forum: General
Topic: Larger font in larger output console window
Replies: 9
Views: 2608

Re: Larger font in larger output console window

Hi, http://www.freebasic-portal.de/code-beispiele/windows-gui/schriftart-in-der-konsole-aendern-232.html #Include Once "windows.bi" 'ab Windows Vista Const FF_LUCIDA = 54 'Const FF_TERMINAL = 48 Type CONSOLE_FONT_INFOEX cbSize As UInteger nFont As Integer dwFontSize As COORD FontFamily As ...
by I3I2UI/I0
Mar 13, 2013 14:14
Forum: Libraries & Headers
Topic: GUI library for Windows \ Linux (window9)
Replies: 1050
Views: 270781

Re: FBGUI library for windows 2

VANYA wrote:I did not know anything about this, but here article (on russian) , that explains how it can be implemented
Nice article, but I read nothing about the implementation in window9.
by I3I2UI/I0
Mar 12, 2013 18:51
Forum: Libraries & Headers
Topic: GUI library for Windows \ Linux (window9)
Replies: 1050
Views: 270781

Re: FBGUI library for windows 2

Hi, an example of a splash screen with a transparent background. This tip worked: http://www.codeproject.com/Tips/141076/Transparent-OpenGL-window #Include "window9.bi" #Include "GL/glut.bi" Dim Shared As Integer OpenGL = 1 Sub RenderScene Static i As Single glClear GL_COLOR_BUFF...
by I3I2UI/I0
Dec 30, 2012 13:51
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 43740

Re: JASC Soccer

Hi Pitto, .. #Include "fbfont_24.bas" '#Include "fbfont.bas" 'FBVersion < 0.24 .. 'Change for integer division / to \ 'code for / 'fld qword ptr [_Lt_00F3] -> _Lt_00F3: .double 32 'fistp dword ptr [ebp-4] 'code for \ (faster, small code) 'mov dword ptr [ebp-4], 32 .. Sub draw_akn...
by I3I2UI/I0
Dec 26, 2012 19:26
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 43740

Re: JASC Soccer

Hi Pitto, .. #define PITCH_H 608 .. #define SCREEN_W 800 #define SCREEN_H 500 .. #Define PI 3.14159265f #define PI2 PI/2 #define PI4 PI/4 #define PI1_5 PI*1.5f #define PI_2 PI*2f #define GRAVITY 0.980665f .. 'Change Byte|UByte to Integer 'For a 32-bit Basic use of integer(32-bit) variables is the be...
by I3I2UI/I0
Dec 20, 2012 21:21
Forum: Game Dev
Topic: JASC Soccer
Replies: 78
Views: 43740

Re: JASC Soccer

out of date