Search found 12 matches

by mestrinho
Mon Apr 14, 2008 5:47 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Weird issue
Replies: 10
Views: 13258

oh well... there is a way to know if it is the EditDelete sub that is doing something... immediately before calling the sub, make a copy of the buffer, call the sub and on its exit, compare the buffers contents with its former copy...
by mestrinho
Mon Apr 14, 2008 11:22 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Weird issue
Replies: 10
Views: 13258

TmEE Are you sure that array Patterns&() has data in it when you call EditCopy and NO data when you call EditDelete ? I am asking because EditCopy does not modify array Patterns&()... so if array Patterns&() really has data when SUB EditCopy is called and NO data when EditDelete is calle...
by mestrinho
Sun Apr 13, 2008 9:50 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Weird issue
Replies: 10
Views: 13258

In your code, for each and every i%, results obtained are as follows: Case Then EDITCH% ECH% = = 0 0 Patterns&(i%, 0) = 0 1 1 Patterns&(i%, 1) = 0 2 2 Patterns&(i%, 2) = 0 3 3 Patterns&(i%, 3) = 0 4 4 Patterns&(i%, 4) = 0 5 5 Patterns&(i%, 5) = 0 6 6 Patterns&(i%, 6) = Pa...
by mestrinho
Wed Apr 09, 2008 8:57 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Weird issue
Replies: 10
Views: 13258

Simplify: SUB EDITCOPY COPYPASTELEN% = COPYLEN% COPYEND% = COPYSTART% + COPYLEN%: ii% = 0 ECH% = EDITCH% + EDITCH% > 6 FOR i% = COPYSTART% TO COPYEND% CopyPaste&(ii%) = Patterns&(i%, ECH%) IF EDITCH% = 7 THEN CopyPaste&(ii%) = CopyPaste&(ii%) \ 65536 ii% = ii% + 1 NEXT i% END SUB SUB...
by mestrinho
Wed Apr 09, 2008 7:27 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: swapping the bytes of an integer
Replies: 13
Views: 21019

yet another very simple way of doing it :)

i = 27917
i = (i MOD 256) * 256 + i \ 256
print i
by mestrinho
Wed Apr 09, 2008 7:05 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Weird issue
Replies: 10
Views: 13258

1) In both your editcopy and editdelete SUBs, variable editch% is "non-varying" i.e., it is constant for the whole cycle, so why keep comparing it (select case) for the whole "for to" cycle if it always same ? 2) if copylen% is real length to copy, then should be: COPYEND% = COPY...
by mestrinho
Wed Apr 09, 2008 10:19 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Michael, ? The code is correct and compiles correctly without errors... ? But I noticed now that once again, there was a problem with the copy / paste into the forum :( grrrrrrrr.... I must disable everything, smilies, html, BBCode, etc... otherwise some of the variables are transformed to smilies a...
by mestrinho
Tue Apr 08, 2008 9:29 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Ok... finally managed to post the code... All variables are integers with exception of variable cycle which is a LONG Integer DEFINT A-Z '$STATIC DIM arr1(4000, 4), ar0(500, 3) DIM tmp(200, 4), ok(50, 3) DIM ar1(50, 3), rndnumb(4095) DIM cycle AS LONG '... '... inicial QB code goes here '... '... fo...
by mestrinho
Tue Apr 01, 2008 3:55 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Yes, it fits perfectly for x86 and Z80. 1) I am going to "correct" it so numbers vary between 0 and 255. 2) I am also going to take out the i/o, rnd and randomize parts to ease it up... 3) I will also prepare an array with random numbers to be used within the assembler routine as if it wer...
by mestrinho
Mon Mar 31, 2008 10:07 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Ok... here is the code I would like to have transformed into assembler / machine code. I have cut out all code that will remain as QB.

I am using Microsoft (R) QuickBASIC Extended v7.1 ... has always been my programming language

Code: Select all

...
by mestrinho
Mon Mar 31, 2008 1:19 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Yes, thanks burger2227. My problem is I do not have much time on my hands at this moment and I have other QB routines to write. What I am wishing is that someone visiting this forum is willing to rewrite this small portion of code in Assembler/Machine code. The code in question is on another machine...
by mestrinho
Mon Mar 31, 2008 11:03 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Assembler / Machine Language
Replies: 13
Views: 20017

Assembler / Machine Language

Hi I have been programming in QuickBasic for as long as I can remember... I now have a small 143 line routine in one of my programs that I would like to rewrite in assembler/machine code to drastically improve performance. It is a pretty straightforward routine with various cycles performing compare...