can u take a borland header file and include it in dev. it's gotta be
possible. if u can could any of u guys atach one for me
i need
<constrea.h>
thanks!
Printable View
can u take a borland header file and include it in dev. it's gotta be
possible. if u can could any of u guys atach one for me
i need
<constrea.h>
thanks!
copyright huh...
i'll trie a coded language
/(%&please%&send%&/me%&/%&/anyway
%&email??!!%&/&/maybe/&)or&/&/%&here&/%
icq!!&/&%/i%&/%&/have%&%&
I thought Borland was free.
>copyright huh...
Which part of
doesn't compute? Nobody can provide what you're asking unless they re-write the library for you. Which function(s) do you need to emulate?Quote:
And chances are that if you don't have the library already, it wont work with your compiler
it may work
its still the same laguage
i need gotoxy()
and some more
and i dont want to use that
HANDLECURSOR...stuff
>its still the same laguage
What language is that then?
If by that you mean the win32 API, then you need you need a compiler that supports gotoxy. However as any modern win32 compiler that contains this will have to call the win32 functions anyway I don't see why you're objecting to it. Just wrap the win32 calls in your own gotoxy function.Quote:
and i dont want to use that
HANDLECURSOR...stuff
ok then what header should i include to get the gotoxy
i'm using dev
what language??? uhh c-- maybe!
you can find a sample on this site.
go to the FAQs section.
as for using the coordinates in windows, there is a slight disadvantage since there is too much machine coding involved just to do a simple task whereas you can create one using ASM/MASM that does it with efficiency and speed if you know how to do it optimized.
>ok then what header should i include to get the gotoxy
Dev C++ may have a specific header/library that wraps it, but -
from the FAQ works.Code:#include <windows.h>
void gotoxy(int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
>what language??? uhh c-- maybe!
Try opening an object/lib file in your favourite source file editor.
If you're writing for console programs in a win32 enviroment, I'd like to see this asm.Quote:
here is a slight disadvantage since there is too much machine coding involved just to do a simple task whereas you can create one using ASM/MASM that does it with efficiency and speed if you know how to do it optimized.
i've done that many times and all i can see is c++
>i've done that many times and all i can see is c++
OK, since you can only see C++ you shouldn't have any trouble with -
Code:L ' .text t # `.data l @ .bss UE } u
E !t& }u
Ed }uE EPj P ÉUÍv U8fE fE EPj P EPEPEUPj j P jj %s
UEPh 1%c
U EEPh U Ív U(EPj P EUEUPEUPEUPEUPE@EUPEUPy UB .. UB
ÉUEHfEEHfEEPj P ÐUÍv U= P = Po
UhB %c UEPh\ U ÐUEPj P U} uE E E RÉU} uE E E PlÍv U(EPj P Uv ÉU(EPj P U ÉUEfEEfEEfEEfEEPjj P EPEP J U ! & % % & K V " % 0 N S & n s & # 3 > g r $ .file gconio.c % _clreol ` _clrscr h _cputs _getche 5 8 B Q _inslineD _putch ` \ _window f v _wherey T _wherex _gotoxy .text # .data .bss .. : _getchar _printf S gcc2_compiled. ___gnu_compiled_c __setcursortype _gettextinfo _gppconio_init _highvideo _textattr _textbackground _textcolor ___FOREGROUND ___BACKGROUND _GetStdHandle@4 _SetConsoleCursorInfo@8 _GetConsoleScreenBufferInfo@8 _FillConsoleOutputCharacterA@20 _SetConsoleCursorPosition@8 _SetConsoleTextAttribute@8 _SetConsoleWindowInfo@12
man your dumb!
what have u done?
>man your dumb!
Yep.
>what have u done?
You're dumber.
idiot u can put them in your libs or includes it maybe it will work
and maybe not
but it isn't different languages i tell u!
um, for MASM 32 bit, found a sample for you although it's not really "super optimized" or anything but does it quick.
if you actually do a comparison between the two using a slow microprocessor and low memory, you will see a difference where the c++ version will have a slight lag.
anyway, here is the sample (it's on a 32 bit compatible console):
here is the executable (after compiling this):Code:
; ########################################
.386
.model flat, stdcall
option casemap :none ; case sensitive
; ########################################
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
; ------------
; Local macros
; ------------
print MACRO Quoted_Text:VARARG
LOCAL Txt
.data
Txt db Quoted_Text,0
.code
invoke StdOut,ADDR Txt
ENDM
input MACRO Quoted_Prompt_Text:VARARG
LOCAL Txt
LOCAL Buffer
.data
Txt db Quoted_Prompt_Text,0
Buffer db 128 dup(?)
.code
invoke StdOut,ADDR Txt
invoke StdIn,ADDR Buffer,LENGTHOF Buffer
mov eax, offset Buffer
ENDM
cls MACRO
invoke ClearScreen
ENDM
Main PROTO
; ########################################
.data
Msg1 db "Type something > ",0
Msg2 db "You typed > ",0
; ########################################
.code
start:
invoke Main
invoke ExitProcess,0
; ########################################
Main proc
LOCAL InputBuffer[128]:BYTE
; -------------------------------
; console mode library procedures
; -------------------------------
; ------------
; using macros
; ------------
cls
print "Console function test",13,10,13,10
input "Enter Some Text > "
invoke StdOut,eax ; return address in eax
; ----------------
; using procedures
; ----------------
invoke locate,10,10 ; <------------------- LOOK HERE
invoke StdOut,ADDR Msg1
invoke StdIn,ADDR InputBuffer,LENGTHOF InputBuffer
invoke locate,10,11 ; <------------------- LOOK HERE
invoke StdOut,ADDR Msg2
invoke StdOut,ADDR InputBuffer
ret
Main endp
; ########################################
end start
oh yeah, i converted the file to type ".zip"
just change the extension to ".exe" (".exe" files are invalid) or else it the computer will claim that the file is corrupted or something.
and honestly, this is a fresh copy (no anything but the program itself). if you don't believe me, don't download it. you can even try every single virus scanner ever developed on earth. otherwise, the source is available for viewing above. lastly, stop this arguing already (if it is an arguement).
All your asm is doing is calling win32 Api C functions. masm32.inc is providing the declarations for conio type functions which are implemented in calls to the Win32 aip in masm32.lib. If your C/C++ compiler is generating slower code to call SetConsoleCursorPosition(), then I suggest you change your C/C++ compiler.
look at the libs included with dev! i found a multitude of stuph that handled cursors or text and stuff both in console and windows! it is in /[dev-C++ folder path here]/includes/
im pretty sure gotoxy is in something like mingw_conio.h in dev and hey dev sucks get a better compiler